/** * React hook for synchronizing a state value with browser LocalStorage. * * This hook provides a stateful value and a setter function, similar to `useState`, * but persists the value in LocalStorage under the specified key. The value is * automatically updated when LocalStorage changes (including from other tabs/windows). * * Use this hook only when you need to persist state across sessions or tabs. * If you only need to share state within a single session, consider using `useSessionStorage` * * Example: * ```tsx * const [value, setValue] = useLocalStorage('myKey', 'defaultValue'); * * // Read the value * console.log(value); * * // Update the value (persists to LocalStorage) * setValue('newValue'); * ``` * * @param key - The LocalStorage key to store the value under. Must be a non-empty string. * @param defaultValue - The default value to use if the key does not exist in LocalStorage. * @returns A tuple containing the current value and a setter function to update it. * */ declare function useLocalStorage(key: string, defaultValue?: unknown): [unknown, (newValue: unknown) => unknown]; export { useLocalStorage }; //# sourceMappingURL=useLocalStorage.d.ts.map