usehooks-ts
Version:
React hook library, ready to use, written in Typescript.
10 lines • 362 B
TypeScript
import { Dispatch, SetStateAction } from 'react';
declare global {
interface WindowEventMap {
'local-storage': CustomEvent;
}
}
declare type SetValue<T> = Dispatch<SetStateAction<T>>;
declare function useLocalStorage<T>(key: string, initialValue: T): [T, SetValue<T>];
export default useLocalStorage;
//# sourceMappingURL=useLocalStorage.d.ts.map