Replies: 2 comments 1 reply
-
https://reactrouter.com/docs/en/v6/api#useparams |
Beta Was this translation helpful? Give feedback.
1 reply
-
Ever managed to solve this? I'm having the same problem in v6.4 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
How can I access the path string in v6?
In v5 I could do
const { path, url } = useRouteMatch()
to get the un-substituted path, likepage/:pageId/edit
.In v6
useLocation
only returns the final path (formerly whaturl
gave uspage/123/edit
.I have poured over the docs and source code, and cannot seem to figure it out.
Beta Was this translation helpful? Give feedback.
All reactions