Import this in your client-side component
MyComponent.tsx
import { useStorage } from "react-amazing-hooks";| Api | Description | Type | Return Type | Example |
|---|---|---|---|---|
| useStorage | A hook to manage state in localStorage or sessionStorage with expiration. | StorageItem* | [value:T] | Note* |
Check the StorageItem and StorageType in the 'Types' tab. *
Check the 'Example' tab above the table for an exhaustive example. *