/**
* Persists state to localStorage with SSR safety and JSON serialization.
*
* @remarks
* This hook synchronizes state with localStorage, allowing data to persist
* across page refreshes and browser sessions. It is SSR-safe and returns the
* initial value on the server until hydration completes. The hook also syncs
* state across tabs/windows via the `storage` event.
*
* Error handling:
* - On initial load, a JSON parse failure falls back to `initialValue`.
* - On a cross-tab `storage` event with malformed JSON, the event is ignored
* and the current local state is preserved (to avoid wiping user state on a
* bad cross-tab message).
* - `localStorage` write failures (quota exceeded, private-mode restrictions)
* are swallowed silently — the in-memory state update still succeeds.
*
* @typeParam T - The type of the value being stored.
* @param key - The localStorage key to store the value under.
* @param initialValue - The default value to use if no value is found in localStorage.
* @returns A tuple containing the current value and a setter function.
*
* @example
* ```tsx
* function UserSettings() {
* const [theme, setTheme] = useLocalStorage("theme", "light");
*
* return (
*
* );
* }
* ```
*
* @example
* ```tsx
* function ShoppingCart() {
* const [cart, setCart] = useLocalStorage("cart", []);
*
* return (
*
* );
* }
* ```
*/
export declare function useLocalStorage(key: string, initialValue: T): [T, (value: T | ((prev: T) => T)) => void];
//# sourceMappingURL=useLocalStorage.d.ts.map