@studio-lumio/hooks
Version:
a compilation of react hooks we use to make our magic
7 lines (6 loc) • 392 B
TypeScript
type InitialValueType = string | number | boolean | object | null | any;
type StoredValue = InitialValueType;
type SetValue = (value: InitialValueType | ((val: InitialValueType) => InitialValueType)) => void;
type RemoveValue = () => void;
export declare function useLocalStorage(key: string, initialValue?: InitialValueType): Readonly<[StoredValue, SetValue, RemoveValue]>;
export {};