@nanostores/persistent
TypeScript icon, indicating that this package has built-in type declarations

0.10.1 • Public • Published

Nano Stores Persistent

A smart store for Nano Stores state manager to keep data in localStorage and synchronize changes between browser tabs.

  • Small. from 281 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.
import { persistentAtom } from '@nanostores/persistent'

export const locale = persistentAtom('locale', 'en')

Made in Evil Martians, product consulting for developer tools.


Docs

Read full docs here.

Package Sidebar

Install

npm i @nanostores/persistent

Weekly Downloads

10,886

Version

0.10.1

License

MIT

Unpacked Size

12.5 kB

Total Files

5

Last publish

Collaborators

  • dkzlv
  • ninoid
  • wobsoriano
  • ai