Skip to content
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

breaks Redux store.replaceReducer - Last 50 actions RE-APPLIED #464

Closed
crobinson42 opened this issue Feb 24, 2018 · 2 comments
Closed

breaks Redux store.replaceReducer - Last 50 actions RE-APPLIED #464

crobinson42 opened this issue Feb 24, 2018 · 2 comments

Comments

@crobinson42
Copy link

When you invoke store.replaceReducer(newReducer) the last 50 (maxage default param) actions are applied/run-through the store.

This has the potential to break a lot of applications, mine in particular where several of the last 50 actions are using http or socket middleware for async actions. During the state of my application I use code-splitting which involved heavy utilization of store.replaceReducer anytime a new module is loaded I register a new reducer dynamically thus invocation of replaceReducer.

Is this intended to be a feature or a potential bug? Thanks!

@NaitoKenzo
Copy link

Any update on this one? Happy to help if possible.

@zalmoxisus
Copy link
Owner

When you use store.replaceReducer the effect will be the same as for hot-reloading, where the extension is recomputing all the history again. To avoid that set shouldHotReload parameter to false.

Added this to Troubleshooting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants