UNPKG

reactuals

Version:

A useful package providing a collection of 50+ React hooks and utilities to simplify React development.

8 lines (7 loc) 251 B
/** * A hook that synchronizes state with sessionStorage. * * Example: * const [sessionData, setSessionData] = useSessionStorage("data", {}); */ export declare function useSessionStorage<T>(key: string, initialValue: T): [T, (value: T) => void];