useLocalStorage
Persistent state backed by localStorage with JSON serialization.
Installation
Usage
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| key* | string | required | localStorage key. |
| defaultValue* | T | required | Initial value if key is not set. |
| returns | [T, setter] | — | Current value and a setter function. |
useWindowSizeEnd of docs