jportela / redux-saga-persistence Goto Github PK
View Code? Open in Web Editor NEWPersistence implementation using Redux Sagas
Home Page: http://www.joaoportela.com/redux-saga-persistence
Persistence implementation using Redux Sagas
Home Page: http://www.joaoportela.com/redux-saga-persistence
Currently the latest version is 0.15.6: https://www.npmjs.com/package/redux-saga
It might be as simple as bumping the package version on package.json
, but please test the example before to be certain it does not break functionality.
Hi João,
First off, thanks so much for this repo and for your corresponding blog post - it has been extremely helpful in getting persistence off the ground for my react/redux project.
One question regarding dispatching actions to the reducers on SERVER_LOAD_SUCCESS. When retrieving initial state from the PersistenceEngine and dispatching an action to the reducers:
const state = yield call(PersistenceEngine.load);
yield put(serverLoad.success(state));
Is there a way to capture the SERVER_LOAD_SUCCESS action in a given reducer without fully specifying the piece of the action payload to assign the initial state?
In other words, instead of writing this in a given reducer:
function sqlText(state = initialState.sqlText, action) {
switch(action.type) {
case types.SERVER_LOAD_SUCCESS:
return action.payload.user_data.consoleInputPanel.sqlText
You could write this?:
function sqlText(state = initialState.sqlText, action) {
switch(action.type) {
case types.SERVER_LOAD_SUCCESS:
return action.sqlText
One way to deal with this would be to dispatch different actions for different pieces of the state, but I was wondering if in your experience, you have come up with a way to accomplish this in a way that if reducer structure changes, it's not necessary to refactor the load logic.
Update the react
package to latest version (16.0.0): https://www.npmjs.com/package/react
Update related modules to the latest versions too, and check if the example still runs.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.