1.0.0 • Published 9 months ago

@nanostores/persistent v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

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 at Evil Martians, product consulting for developer tools.


Docs

Read full docs here.