/** * React hook for synchronizing a state value with browser SessionStorage. * * This hook provides a stateful value and a setter function, similar to `useState`, * but persists the value in SessionStorage under the specified key across the same session. * * Use this hook only when you need to persist state across tabs within the same session. * If you need to persist state across sessions, consider using `useLocalStorage` * instead. * * Example: * ```tsx * const [value, setValue] = useSessionStorage('myKey', 'defaultValue'); * * // Read the value * console.log(value); * * // Update the value (persists to SessionStorage) * setValue('newValue'); * ``` * * @param key - The SessionStorage 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 SessionStorage. * @returns A tuple containing the current value and a setter function to update it. * */ declare function useSessionStorage(key: string, defaultValue?: unknown): [unknown, (newValue: unknown) => unknown]; export { useSessionStorage }; //# sourceMappingURL=useSessionStorage.d.ts.map