-
-
Notifications
You must be signed in to change notification settings - Fork 303
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
Error: Could not find router reducer in state tree, it must be mounted under "router" #91
Comments
Adjust your code as indicated here: https://www.npmjs.com/package/connected-react-router This allowed me to resolve this issue. I don't entirely understand the difference or why it matters now, but it did unblock me! |
Could @sengeezer or someone else be a little bit more specific on how to fix that error? I have the same error. And following above link, I cannot figure out how to adjust the code. Thanks a lot! |
Did any one find the solution? |
@woodyjon What I meant was, try following the module authors' how to to compare this CRA's version to their version. Retracing my commits, what I think I did was:
I didn't implement everything as per the medium article. I already had taken a somewhat different approach, so YMMV. |
Well moreover I found out it was my fault. I was passing a wrong initialState... |
The answer @sengeezer gave worked for me and fixed my problem. |
In my case I was using history version 5.0.0, I decrease to version 4.10.1, it works fine. |
The main issue is the version of the history package, with react-router-dom v5 you need to use history v4 (the latest version of which is 4.10.1) - history v5 is only compatible with react-router-dom v6. |
The text was updated successfully, but these errors were encountered: