{"library":"use-storage-state","type":"library","category":null,"description":"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.","language":"javascript","status":"active","version":"7.0.0","tags":["javascript","react","hook","Storage","localStorage","sessionStorage","persistent","state","useState"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install use-storage-state","imports":["import useStorageState from 'use-storage-state'","const useStorageState = require('use-storage-state')","import useStorageState from 'use-storage-state'\nimport type { StorageStateOptions } from 'use-storage-state'"]},{"cmd":"yarn add use-storage-state","imports":[]},{"cmd":"pnpm add use-storage-state","imports":[]}],"homepage":"https://github.com/astoilkov/use-storage-state","github":"https://github.com/astoilkov/use-storage-state","docs":null,"changelog":null,"pypi":null,"npm":"use-storage-state","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}