v3.0.0-rc.1: `useRoute` should allow `nest` option just like `<Route />`
happenslol opened this issue Ā· comments
Hilmar Wiegand commented
Right now, it's not possible to get the same behavior from useRoute
as you would from <Route nest />
, instead I have to do the following:
const [match] = useRoute("/route")
const [nestedMatch] = useRoute("/route/:rest*")
const isNestedMatch = match || isNestedMatch
By simply allowing to pass the parameter in an options object or providing an additional useNestedRoute
, this would be a lot cleaner.
Hilmar Wiegand commented
Alright, I've used rc.2 for a bit now, and I understand that it's now possible to use something like useRoute("/route/*?")
to match nested routes, so I think that covers my use case.