-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
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
Persist state of redux #23
Comments
@AleXzpm hi, did you find the solution? |
We could probably add a mechanism for allowing this. Maybe some kind of hook |
@BenLorantfy thank you, and could you please investigate how we can use immer with your library? |
@siarheipashkevich no I did not, other then giving up on Injectors. Hopefully @BenLorantfy can create some hook for this. |
@siarheipashkevich immer should work fine with this library... were you running into any issues? |
@AleXzpm I thought about this some more and I don't think this requires any changes in
The key is to move the |
It works for me thank you @BenLorantfy 🙏 |
@BenLorantfy @Pixel-Jack
as
and then in configureStore leave it as
|
EDIT, nope, need to refactor saga reducer wiring, store config, to include reducers/sagas statically for persisting and rehydrating for react-boilerplate-cra-template |
Using redux-injectors makes it imposible to persist the state because the injectorsEnhancer regularly replaces the rootReducer with a new one - and only the initial one of those is persisted. Am I wrong? How can we persist the state of redux?
![image](https://user-images.githubusercontent.com/13512048/115973069-089c4c80-a55b-11eb-8618-bbeeda1acb46.png)
![image](https://user-images.githubusercontent.com/13512048/115973075-181b9580-a55b-11eb-9840-ef81400f7679.png)
The text was updated successfully, but these errors were encountered: