-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
State doesn't update when replaceReducers is called with combineReducers and one of the reducers passed to it is removed. #3488
Comments
anubhavgupta
pushed a commit
to anubhavgupta/redux
that referenced
this issue
Jul 31, 2019
Raised a PR which will fix this issue. |
anubhavgupta
pushed a commit
to anubhavgupta/redux
that referenced
this issue
Jul 31, 2019
timdorr
added a commit
that referenced
this issue
Aug 12, 2019
Given that #3490 has been merged, this can be closed. |
webMasterMrBin
pushed a commit
to webMasterMrBin/redux
that referenced
this issue
Aug 21, 2021
* Fixed combineReducers changeDetection logic(reduxjs#3488) * Cleaning up these and some other tests while I'm here Co-authored-by: gupta <guptanub@amazon.com> Co-authored-by: Tim Dorr <timdorr@users.noreply.github.com> Former-commit-id: 0435ce1 Former-commit-id: 4d8662c
webMasterMrBin
pushed a commit
to webMasterMrBin/redux
that referenced
this issue
Aug 21, 2021
* Fixed combineReducers changeDetection logic(reduxjs#3488) * Cleaning up these and some other tests while I'm here Co-authored-by: gupta <guptanub@amazon.com> Co-authored-by: Tim Dorr <timdorr@users.noreply.github.com> Former-commit-id: 0435ce1 Former-commit-id: 4d8662c
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you want to request a feature or report a bug?
bug
What is the current behavior?
The
combineReducers
function does't detect if one of the reducers passed to it is removed(via replaceReducers) and thus returns an old state.Steps to reproduce:
Open JSFiddle Link:
-> 2 boxes gets rendered, one of
foo
and other ofbar
.bar
reducer" button-> Again, 2 boxes gets rendered, one of
foo
and other ofbar
.Expected: Only one box should render, i.e. box of
bar
only.What is the expected behavior?
The
combineReducers
function should detect if one or more reducers passed to it is removed(via replaceReducers) and thus should update the store with new state.Which versions of Redux, and which browser and OS are affected by this issue? Did this work in previous versions of Redux?
Redux Version: V4.0.4
OS: MAC
Worked on previous versions: no.
The text was updated successfully, but these errors were encountered: