Skip to content
Fine-grained control over the persisting and rehydration of your redux store 🎰
JavaScript TypeScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
lib
.DS_Store
.gitignore
README.md
package-lock.json
package.json
tsconfig.json

README.md


version license downloads


redux-persist-machine provides a reliable way to rehydrate your state. The state can be rehydrated on a per reducer basis at any time in your application lifecycle.

  • Load data conditionally with LOAD actions (e.g. only load orders from storage if the request to fetch them fails)
  • Don't allow shape changes in your store to affect your data (each stored reducer will have its own key and loaded data is reassigned manually in each reducer)
  • Define how your reducers receive and persist loaded data, allowing further customisation on when and how data is rehydrated through your application.

See our documentation.

Motivation

Why not use redux-persist?

redux-persist is a well written library, with support for many storage engines, and transformers which allow for complex use cases.

redux-persist-machine gives you more control over how your data is loaded in your application; when your data is loaded, which data you want to save and load, and how your data is received / rehydrate by each reducer.

"From personal experience building many applications with redux and redux-saga I've found it's necessary to handle loaded data in your reducers in products with rapidly changing requirements to provide a reliable customer experience" -- Luke Brandon Farrell

There are many other options for persisting data, but if you want to provide an offline first experience, and control how your data is loaded into your application, then redux-persist-machine is the best option for you.

Authors

License

This project is licensed under the MIT License

You can’t perform that action at this time.