match not correctly updated? #272
Unanswered
JamesJMadden
asked this question in
Q&A
Replies: 0 comments
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.
-
Given the below route structure, and outputting the value of
match.pathname
using theuseMatch
hook in<RouteElement/>
.Navigating to
/route
correctly outputs/route
. However when navigating to/childroute
I would expect match inRouteElement
to output/route/childroute
, given that/childroute
has no element and defers to its parent. This doesn't seem to be the case and the value formatch.pathname
is still/route
The same could be said for any
match.params
I'd need to access inRouteElement
from a childroute.Is this working as intended, and if so whats the reasoning for this decision?
Link to code sandbox
Beta Was this translation helpful? Give feedback.
All reactions