-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Can't include in app with connected-react-router v5 #2549
Comments
Duplicate of #1999. |
@fzaninotto I don't agree it is a duplicate. I am not saying that react-router-redux is deprecated, but that react-admin is not compatible with connected-react-router. |
Sorry, I must have misunderstood something. You're saying that connected-react-router doesn't allow to change the routing key in the state, so I don't understand how your proposed change can be backwards compatible. |
Indeed, connected-react-router doesn't allow to change the routing key in the state, but redux-react-router does. I suggest changing the routing key in react-admin while it still uses redux-react-router. I hope I made myself clearer 😃 |
Yes, now I understand, thanks. I'd gladly accept a PR to change the routing key in the react-admin state. Please open it against |
Fixed by #2551 |
Sorry, wrong issue. |
Make sure we don't use any selectors from |
The redux-react-router docs say here that you can specify a custom routing state selector if needed. I created the PR, the tests pass. Do you think I ought to write documentation about this change ? And where would I write it ? |
No need for more documentation, we'll mention it in the changelog. |
Ok thanks. I think my PR is ready, it is here |
Fixed by #2553 |
Please do not submit support requests or "How to" questions here. For that, go to StackOverflow.
What you were expecting:
I include React-admin in my app. I expect it to work, it crashes.
Steps to reproduce:
Have an App that uses connected-react-router, especially v5. The routing state in redux is stored under a key named "router" and cannot be changed.
However in react-admin the key is named "routing" and cannot be changed either.
For information react-router-redux (used by react-admin) is deprecated, the new library to use is connected-react-router
Suggested change:
I suggest changing the routing store key name in react-admin from "routing" to "router". I believe it involves changing these only 3 files:
And documentation:
I would glady open a PR.
Other information:
Environment
The text was updated successfully, but these errors were encountered: