You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i have an app, whats reducer is dynamic. the reducer is combined by combineReducers,but combineReducers seems have a cache Strategy, if new reducer map have the same result in old state, after traversal, it will return old state.even if the new reducer map has less reducer key than old reducer map, in this case i want to get exact next state after i invoke replaceReducer.🙂
What is the current behavior?
combineReducers return old state in the case next reducer map has less key than previous reducer map.
🎉🎉🎉thanks for replying so quickly ,but i could only find a special check for REPLACE action in warningMessage,
it seems still have my situation,while i do replaceReducer with a less reducer map
(the old reducercombineReducers({a:()=>'a',b:()=>'b'}) => new reducercombineReducers({a:()=>'a'})),
the combineReducers returned combination func deal REPLACE action, still return old state {a:'a',b:'b'},meanwhile,b is not in my new reducer🤔
Do you want to request a feature or report a bug?
bug
Bug Reports
i have an app, whats reducer is dynamic. the reducer is combined by combineReducers,but combineReducers seems have a cache Strategy, if new reducer map have the same result in old state, after traversal, it will return old state.even if the new reducer map has less reducer key than old reducer map, in this case i want to get exact next state after i invoke replaceReducer.🙂
What is the current behavior?
combineReducers return old state in the case next reducer map has less key than previous reducer map.
Steps to Reproduce
👉 https://codesandbox.io/s/interesting-chandrasekhar-h56kh?fontsize=14&hidenavigation=1&theme=dark 👈
What is the expected behavior?
combineReducers return next state in the case: next reducer map has less key than previous reducer map.
Which versions of Redux, and which browser and OS are affected by this issue? Did this work in previous versions of Redux?
redux 4.0.4
What docs changes are needed to explain this?
if combineReducers could not work with replaceReducer in this case, i wish could got a office notice😁
The text was updated successfully, but these errors were encountered: