UNPKG

react-use

Version:
5 lines (4 loc) 281 B
declare type Dispatch<A> = (value: A) => void; declare type SetStateAction<S> = S | ((prevState: S) => S); declare const useLocalStorage: <T>(key: string, initialValue?: T | undefined, raw?: boolean | undefined) => [T, Dispatch<SetStateAction<T>>]; export default useLocalStorage;