Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
[Docs] Incomplete Navigation Resolution Flow #2184
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