We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is a trivial example, but I figured I'd share anyways.
Here's a simple storage driver using idb-keyval, a minimal library that wraps IndexedDB with a simple key-value interface:
import { createStore, get, set } from 'idb-keyval'; import { Driver } from 'redux-remember'; // Create a custom idb-keyval store (just needed to customize the name, else it's awkwardly named "keyval-store/keyval") const idbKeyValStore = createStore('my-database', 'my-store'); // Create redux-remember driver, wrapping idb-keyval const idbKeyValDriver: Driver = { getItem: (key) => get(key, idbKeyValStore), setItem: (key, value) => set(key, value, idbKeyValStore), }; // Usage rememberEnhancer(idbKeyValDriver, rememberedKeys, { serialize, unserialize, })
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This is a trivial example, but I figured I'd share anyways.
Here's a simple storage driver using idb-keyval, a minimal library that wraps IndexedDB with a simple key-value interface:
The text was updated successfully, but these errors were encountered: