/** * Drop-in `useState` replacement that mirrors its value to * `localStorage` under the given key. Same signature as `useState`, so * consumers can wire any state that should survive reloads without * plumbing effects by hand: * * @example * const [pinnedIds, setPinnedIds] = * usePersistentState('ui.sidebar.favorites', * ['dashboard', 'calendar']); * * SSR-safe and quota-safe (swallows serialise / storage errors so a * disabled-storage or quota-exceeded write never throws into render). * * Pass `{ disabled: true }` to make it behave like a plain `useState` seeded * from `initial` — no read, no write. Use this when the value is controlled * elsewhere (e.g. a controlled prop), so the hook never touches `localStorage`. */ export declare function usePersistentState(storageKey: string, initial: T | (() => T), options?: { disabled?: boolean; }): [T, (value: T | ((prev: T) => T)) => void]; //# sourceMappingURL=use-persistent-state.d.ts.map