Web
Session Storage
createSessionStorage()
Creates a reactive handle for a sessionStorage instance.
Example
import { } from 'seitu/web'
import * as from 'zod'
const = ({
: {
: .().(),
: .({ : .(['light', 'dark']) }),
},
: { : null, : { : 'light' } },
})
.(). // null
.(). // { theme: 'light' }
.({ : '123', : { : 'dark' } })
.(). // '123'
.(). // { theme: 'dark' }
.()
.(). // null
.(). // { theme: 'light' }
.( => .())
.({ : '456', : { : 'light' } })
// { token: '456', preferences: { theme: 'light' } }
.()
// { token: null, preferences: { theme: 'light' } }