Home

Awesome

redux-zero persist middleware

Build Status Coverage Status Dependency License Prettier Node npm version Size

Usage

const createStore = require("redux-zero")
const applyMiddleware = require("redux-zero/middleware")
const persist = require("redux-zero-persist");

const persistMiddleware = persist({ key: "[key]", storage: require("localforage") }, function(
  err,
  state
) {
  if (err) {
    console.error(err);
  } else {
    store.setState(state);
  }
});

const middlewares = applyMiddleware(
  persistMiddleware,
  antoherMiddleware
);

const store = createStore(initialState, middlewares);

Contributing

Contributing Guide

如果你觉得项目不错,不要吝啬你的 star.

长期造轮子,欢迎 follow.

Contributors

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<img src="https://avatars1.githubusercontent.com/u/9758711?v=3" width="100px;"/><br /><sub>Axetroy</sub><br />💻 🐛 🎨
<!-- ALL-CONTRIBUTORS-LIST:END -->

License

FOSSA Status