import type { Dispatch, SetStateAction } from 'react'; /** * Generic hook to deal with web storage * * @param storage - the storage to use (localStorage or sessionStorage); if undefined, the hook will be a no-op * @param key - the key to associate with the value * @param fallbackValue - the value to return if the key is not found * @returns a state and a setter function */ export declare const useStorage: (storage: Storage | undefined, key: string, fallbackValue: T) => [T, Dispatch>]; /** * Hook to deal with localStorage * @param key - the key associated to the value in the storage * @param initialValue - the value returned when the key is not found at the storage * @returns a state and a setter function * @public */ export declare const useLocalStorage: (key: string, fallbackValue: T) => [T, Dispatch>]; /** * Hook to deal with sessionStorage * @param key - the key associated to the value in the storage * @param initialValue - the value returned when the key is not found at the storage * @returns a state and a setter function * @public */ export declare const useSessionStorage: (key: string, fallbackValue: T) => [T, Dispatch>]; //# sourceMappingURL=useStorage.d.ts.map