Skip to content

Redux.replaceReducer throw error "Unexpected key found" #360

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

Closed
andreechristian opened this issue Apr 19, 2016 · 3 comments
Closed

Redux.replaceReducer throw error "Unexpected key found" #360

andreechristian opened this issue Apr 19, 2016 · 3 comments

Comments

@andreechristian
Copy link

Hello,
I tried to do a code splitting on route change.

When the route changes to '/register', i dynamically add "registration" as one of the root state using replaceReducer and it work just fine.
Once the registration completed i want to remove the reducer using replaceReducer again, but instead it return the following error :

Unexpected key "registration" found in initialState argument passed to createStore. Expected to find one of the known reducer keys instead: ... Unexpected keys will be ignored.

Thanks in advance

@gaearon
Copy link
Contributor

gaearon commented Apr 19, 2016

I think you should file this in Redux proper, not React Redux. This is probably a bug but I’m not sure if there is a good fix for this other than disabling the warning altogether.

@gaearon
Copy link
Contributor

gaearon commented Apr 19, 2016

Note this is not an error. It is just warning.

@andreechristian
Copy link
Author

Noted. I'll submit this bug on Redux. Thanks ya!

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

2 participants