-
-
Notifications
You must be signed in to change notification settings - Fork 5.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
Use useLocation hook instead of relying on injected location in route components #4240
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks :) Note that these props will still be injected by react-router though
Why should we use |
react-router is moving away from that API with the v5.1 release. It's stated that the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I understand better now, thanks.
Can you make these final tweaks?
Thanks! |
Update remaining places where location is passed in to ignore/handle it but use
useLocation
hook instead.