use-storage-state
JSON →React hook for syncing state with any Storage-compatible API (localStorage, sessionStorage, custom). Current stable version is 7.0.0. Actively maintained with frequent releases. Key differentiators: supports SSR, handles cross-tab/window/iframe synchronization via the Window storage event (configurable), compatible with React 18/19 concurrent rendering, and offers a removeItem() reset method. Built-in TypeScript types. Compared to alternatives like react-use/localstorage, this library is focused, lightweight, and production-proven (used by Twitch). Peer dependencies: React >=18 and react-dom >=18.
Traffic · last 30 days stale · no recent hits
total hits 13
actors 2 distinct systems
last hit 19d ago human
top countries 🇺🇸 United States · 🇸🇬 Singapore · VN · PH · BD
Resources
packageuse-storage-state ↗
API endpoints
full doc /v1/registry/use-storage-state