redux-persist-storage-node
v1.0.1
Published
`redux-persist` storage for Node.js/Electron.
Downloads
8
Maintainers
Readme
redux-persist-storage-node
redux-persist
storage for Node.js/Electron.
Example
// [...]
import {resolve} from "path";
import NodeStorage from "redux-persist-storage-node";
// [...]
persistStore(store, {
keyPrefix: "",
storage: new NodeStorage(resolve("./store.json"))
});
API
Exports a default class.
new NodeStorage(fileName: string)
- fileName: An absolute path to the file to write the storage to.