UNPKG

@dndbuilder.com/react

Version:

Drag and drop builder for React

12 lines (11 loc) 677 B
import { Dispatch, SetStateAction } from 'react'; type InitialValueType<T> = T | (() => T); declare const useLocalstorage: <T>(key: string, initialValue: InitialValueType<T>, { serialize, deserialize }?: { serialize?: { (value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string; (value: any, replacer?: (number | string)[] | null, space?: string | number): string; } | undefined; deserialize?: ((text: string, reviver?: (this: any, key: string, value: any) => any) => any) | undefined; }) => [T, Dispatch<SetStateAction<T>>]; export default useLocalstorage; //# sourceMappingURL=use-localstorage.d.ts.map