-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
Consider exposing matchRoute
helper function
#455
Comments
Hey @acelaya, thank you for suggesting this. I think it makes a lot of sense, so feel free to open a pull request. |
Just published the new version. |
I wanted to ask if you would consider exposing the
matchRoute
helper function that is internally used byuseRoute
andSwitch
.I'm trying to create a custom hook which receives a list of routes in order to check which one matches, but this list of routes is dynamic, so it's not possible to call
useRoute
a bunch of times, since it needs to loop over the list of routes.However, if
matchRoute
was exported by this package, it would allow userland programmatic logic like this:I can provide a PR if you are ok with this.
The text was updated successfully, but these errors were encountered: