react-idb-toolkit
Version:
⚛️ Elegant and easy-to-use React toolkit for managing local data with IndexedDB, powered by [idb](https://github.com/jakearchibald/idb).
8 lines (7 loc) • 411 B
TypeScript
import React from "react";
export interface IndexedDBStateProviderProps {
storeName: string;
children: React.ReactNode;
}
export declare function IndexedDBStateProvider({ storeName, children, }: IndexedDBStateProviderProps): import("react/jsx-runtime").JSX.Element;
export declare function useIndexedDBStateContext<T>(key: IDBValidKey, defaultValue?: T): readonly [any, (newValue: T) => void, boolean];