Closed tofsjonas closed 2 years ago
The route component does not forward the path to its component children you can either pass anonther prop to the route and call it something other than path
or render your component inside the routers slot and also pass it the path like so:
<Route path="foo/*">
<SomeComponent path="foo/*" />
</Route>
Ok, thanks.
I stumbled on what I wanted by doing:
const location = useLocation()
const resolve = useResolve()
let root = resolve('', $location)
😊
If I do this (like in the example here: useResolve):
And then, inside SomeComponent:
I get this i the console: