-
-
Notifications
You must be signed in to change notification settings - Fork 5k
[Docs] Incomplete Navigation Resolution Flow #2184
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
Comments
Based on my reading of source code, it appears beforeRouteLeave is the first item in the navigation guard lifecycle. This makes sense to me because the intention, at least in the docs, is to be a hook for preventing users from leaving the page. https://github.com/vuejs/vue-router/blob/dev/src/history/base.js#L117 |
After looking at the docs again the leave hooks are referenced in the flow but are not using the keyword |
Now that you've said it, it surely does make more sense! Docs are still a little bit more hard to grasp the main ones :D Especially when looked on late at night)) |
@posva Hey! Could you give me some feedback on the diagram, I went purely based on the docs - and I do think it can be improved! |
Sorry I haven't given you feedback on this yet. I'll likely check it in the following weeks/month |
@posva no worries, take your time! 👍 |
I'm fairly sure beforeRouteEnter doesn't get called if the component is re-used |
|
does exist any update?(i loved this diagram too much) |
Hey @posva You can give a feedback here? |
@pribilinskiy is called "Open Source Project". When we contribute we do it with extra time that is not billable. Your comment was unnecesary rude and adds no value to this thread. Consider it next time. |
My apologies, better will try to contribute instead of criticizing |
What problem does this feature solve?
https://github.com/vuejs/vue-router/blob/dev/docs/en/advanced/navigation-guards.md#the-full-navigation-resolution-flow
I think the docs are lacking full flow, not mentioning 'beforeRouteLeave' for example. Would be cool if diagram were to be created, such as used on Vue lifecycle
https://vuejs.org/v2/guide/instance.html#Lifecycle-Diagram
The text was updated successfully, but these errors were encountered: