Web
Web Storage Value
createWebStorageValue()
Creates a reactive handle for a localStorage or sessionStorage instance.
Examples
Vanilla
import { } from 'seitu/web'
import * as from 'zod'
const = ({
: 'sessionStorage',
: 'token',
: .().(),
: null,
})
.() // null
.('abc')
.() // 'abc'
.(.)With storage
import { , } from 'seitu/web'
import * as from 'zod'
const = ({
: 'sessionStorage',
: { : .(), : .() },
: { : 0, : '' },
})
const = ({
: ,
: 'count',
})
.() // 0
.(1)
.() // 1React
'use client'
import { } from 'seitu/web'
import { } from 'seitu/react'
import * as from 'zod'
const = ({
: 'sessionStorage',
: 'count',
: .(),
: 0,
})
export default function () {
const = ()
return (
<>
<>{}</>
</>
)
}