/** * A hook that provides a way to persist state in localStorage. * Automatically syncs the state with localStorage and handles JSON serialization. * * @param key - The localStorage key * @param initialValue - The initial value if no value exists in localStorage * @returns A tuple with the current value and a function to update it * * @example * ```tsx * const [user, setUser] = useLocalStorage('user', { name: 'John', age: 30 }) * * // Update the user * setUser({ name: 'Jane', age: 25 }) * * // The value is automatically saved to localStorage * ``` */ export declare function useLocalStorage(key: string, initialValue: T): [T, (value: T | ((val: T) => T)) => void]; //# sourceMappingURL=useLocalStorage.d.ts.map