react-use-localstorage

JSON →
library 3.5.3 ·javascript
verified Jun 7, 2026

A React hook that synchronizes state with localStorage. Current version 3.5.3 provides a simple useState-like API with automatic persistence. The library has evolved through breaking changes in v3.0.0 (type changes) and v3.4.0 (cross-tab synchronization). Requires React >=16.8.1. Ships TypeScript types. Key differentiator: minimal abstraction over native localStorage, no dependencies beyond React.