A store for Nano Stores state manager to keep data in localStorage
npm install @nanostores/persistent src="https://nanostores.github.io/nanostores/logo.svg">
A smart store for [Nano Stores] state manager to keep data in localStorage
and synchronize changes between browser tabs.
* Small. from 296 bytes (minified and brotlied).
Zero dependencies. It uses [Size Limit] to control size.
* It has good TypeScript.
* Framework agnostic. It supports SSR.
localStorage can be switched to another storage.
``ts
import { persistentAtom } from '@nanostores/persistent'
export const $locale = persistentAtom('locale', 'en')
``
[Nano Stores]: https://github.com/nanostores/nanostores
[Size Limit]: https://github.com/ai/size-limit
---
Made at Evil Martians, product consulting for developer tools.
---