seitu
v0.2.4
Published
[](https://npmjs.com/package/seitu) 
Maintainers
Readme
Seitu
Seitu is a lightweight, framework-agnostic, type-safe utilities library for JavaScript applications on the client and server sides.
Documentation
You can find the documentation here.
Example
To quick start you only need to write the following code:
import { useSubscription } from 'seitu/react'
import { createSessionStorageValue } from 'seitu/web'
import * as z from 'zod'
const value = createSessionStorageValue({
key: 'test',
defaultValue: 0,
schema: z.number(),
})
value.get() // 0
value.set(1)
value.remove()
value.subscribe(v => console.log(v))
function Counter() {
const count = useSubscription(value)
return (
<div>
<span>{count}</span>
<button onClick={() => value.set(c => c + 1)}>Increment</button>
</div>
)
}Seitu has other powerful features, so check out the docs or the examples directory.
License
MIT License - see the LICENSE file for details
