-
-
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
replaceReducer not working when upgrading to version 4 of redux #2943
Comments
The implementation for |
In my store,
This is my function for
After dynamic loading of component, I pass new reducers as such,
This is
|
This is related to Redux DevTools. Disabling the extension fixes this issue for me. Still investigating. |
I just got a report of this behavior from someone working through my Educative "Practical Redux" course:
@joshjg : what did you see in relation to the Redux DevTools ? |
My guess is this might be related to the change in the action for replacing. Maybe DevTools handles INIT action specially. |
That's interesting, because reduxjs/redux-devtools#391 and zalmoxisus/redux-devtools-instrument#17 make it look like there were changes already done to handle this. |
Dev tools was our issue as well after upgrading to v4, it's really tough to troubleshoot. Just implementing an action logger middleware till a release from either team export const loggerMiddleware = store => next => action => {
console.group(action.type); // eslint-disable-line no-console
console.info('dispatching', action); // eslint-disable-line no-console
const result = next(action);
// OMIT toJS if you're not using immutable
console.log('next state', store.getState().toJS()); // eslint-disable-line no-console
console.groupEnd(action.type); // eslint-disable-line no-console
return result;
}; |
I have same issue; i have uninstall extension, and problem persist... replaceReducer still bugged. |
|
Still have this problem, and disabling the @redux-devtools/extension does not work for me. |
@JoaoAlmeida-Kununu this issue was closed 6 years ago. If you're having problems, please file a new issue with a reproduction or a Replay ( https://replay.io/record-bugs ). |
What is new in redux v4?
My code was working with redux v3.x.
But, when upgrading with redux v4, replaceReducer didn't update the reducers.
Where can I know about how to use replaceReducer with redux v4?
Meanwhile, I will be using redux v3.x
This is the implementation BTW, https://github.com/sabbiu/dynamic-reducers-for-react
The text was updated successfully, but these errors were encountered: