import { type Dispatch, type SetStateAction } from "react"; /** * Synchronizes state with `localStorage` so it persists across browser reloads. * Automatically parses JSON and updates state when storage events fire from other tabs. * Supports functional updates and gracefully catches storage quota exceptions. * * @param key - The localStorage key. * @param initialValue - The fallback initial value if the key does not exist. * @returns A tuple matching `useState`: `[value, setStoredValue]`. * * @example * ```tsx * const [theme, setTheme] = useLocalStorage("theme", "light"); * setTheme(prev => prev === "light" ? "dark" : "light"); * ``` */ export declare function useLocalStorage(key: string, initialValue: T): readonly [T, Dispatch>]; export default useLocalStorage;