matchPath relative urls #9894
Unanswered
michaelkay-wrisk
asked this question in
v5 to v6 Migration
Replies: 1 comment
-
see also #8311 |
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.
-
In one of our applications we have nested routes that drive tabs using material ui.
When we were using v5, to find which was the current active tab based upon the current url (for first load use case when sharing links or refreshing) we used a helper like:
Where the
path
passed into this wasmatch.url + '/tab1'
for example.I'm trying to do the equivalent in v6 and not getting anywhere. My tabs now use relative urls but I can't find a way of matching a relative pattern to the full path returned by
useLocation
or the inverse as a way to access the relative url.I thought
end
might be the answer inmatchPath
but it does not seem to have an effect. The below returns null:Is there a way to match a relative url or another solution to this?
Thanks,
Beta Was this translation helpful? Give feedback.
All reactions