Web
Web Storage Value
Reactive handle for one localStorage/sessionStorage key.
createWebStorageValue()
Reactive handle for one localStorage/sessionStorage key. On the server,
get() and the SSR snapshot are defaultValue.
Examples
Vanilla
import { } from 'seitu/web'
import * as from 'zod'
const = ({
: 'sessionStorage',
: 'token',
: .().(),
: null,
})
.()
.('abc')
.()
.(.)React
'use client'
import { } from 'seitu/web'
import { } from 'seitu/react'
import * as from 'zod'
const = ({
: 'sessionStorage',
: 'count',
: .(),
: 0,
})
export default function () {
const = ()
return (
<>
<>{}</>
</>
)
}Edit on GitHub
Last updated on