-
Notifications
You must be signed in to change notification settings - Fork 249
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
feature request #107
Comments
Is it possible to use the |
yes it is but its not convenient it only needs to run on two routes and they might be some use cases for others were its not possible to do it that way |
Ok, I'll think about |
Ok, i think a hook that runs when you are about to navigate away from a route would also also be needed in cases were you have many routes that need the to run code specific to them, a beforeAll would involve too many checks to see what is the current route |
Well isn't it |
they are similar but i think their is a need for both a beforeAll hook would be great in scenarios were the code you want to run applies to all routes, if you have many routes that have code specific to them a onLeave hook makes more sense eg in a single page app where the their are many different event listener tied to the html of the specific routes using a beforeAll to remove them would involve checking to see what route your on first while using a onLeave hook you could just remove then as the code will only run on the specific route |
I wanna beforeAll and afterAll for common operations too. I will be grateful for that feature :) |
4.8.0 version released. It contains generic hooks + leave hook. P.S. |
i would like to request a hook that runs when you are about to navigate away from a route regardless of the route your navigating to
The text was updated successfully, but these errors were encountered: