@ohm-vision/react-storage
Version:
Extension to React to interact with native Window Storage object
11 lines (10 loc) • 444 B
TypeScript
import { StorageProps } from "../config/storage-props";
import { StorageInterface } from "../interfaces/storage-interface";
/**
* Default storage hook, this method is what all other `use{type}Storage` methods derive from
*
* This hook will default to `JSON.parse` and `JSON.stringify` to convert methods
* @param props
* @returns
*/
export declare function useStorage<TElement>(props: StorageProps<TElement>): StorageInterface<TElement>;