npm install --save @types/use-persisted-state
This package contains type definitions for use-persisted-state (https://github.com/donavon/use-persisted-state#readme).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/use-persisted-state.
import { Dispatch, SetStateAction } from "react";
declare function createPersistedState<S>(key: string, provider?: Pick<Storage, "getItem" | "setItem">): {
(initialState: S | (() => S)): [S, Dispatch<SetStateAction<S>>];
(): [S | undefined, Dispatch<SetStateAction<S | undefined>>];
};
export as namespace createPersistedState;
export = createPersistedState;
- Last updated: Thu, 30 Jan 2025 20:02:33 GMT
- Dependencies: @types/react
These definitions were written by Karol Majewski.