import { type Dispatch, type SetStateAction } from "react"; /** * Synchronizes state with `sessionStorage` so it persists across reloads but clears when the tab closes. * Automatically parses JSON, supports functional updates, and safely handles storage quota errors. * * @param key - The sessionStorage key. * @param initialValue - The fallback initial value if the key does not exist. * @returns A tuple matching `useState`: `[value, setStoredValue]`. * * @example * ```tsx * const [draft, setDraft] = useSessionStorage("draft", ""); * setDraft(prev => prev + " new draft text"); * ``` */ export declare function useSessionStorage(key: string, initialValue: T): readonly [T, Dispatch>]; export default useSessionStorage;