Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3.0.0-rc.1: useRoute should allow nest option just like <Route /> #406

Closed
happenslol opened this issue Jan 18, 2024 · 1 comment
Closed

Comments

@happenslol
Copy link

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.

@happenslol
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant