UNPKG

use-storage-state

Version:

React hook that you can wire with any Storage compatible API like `localStorage`, `sessionStorage`, or a custom one.

9 lines (8 loc) 250 B
declare class MemoryStorage { private storage; getItem(key: string): string | null; setItem(key: string, value: string): void; removeItem(key: string): void; } declare const memoryStorage: MemoryStorage; export default memoryStorage;