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

[Docs] Incomplete Navigation Resolution Flow #2184

Open
kirillbunin opened this issue May 4, 2018 · 13 comments
Open

[Docs] Incomplete Navigation Resolution Flow #2184

kirillbunin opened this issue May 4, 2018 · 13 comments

Comments

@kirillbunin
Copy link

@kirillbunin kirillbunin commented May 4, 2018

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

@trainiac
Copy link
Contributor

@trainiac trainiac commented May 9, 2018

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

@trainiac
Copy link
Contributor

@trainiac trainiac commented May 9, 2018

After looking at the docs again the leave hooks are referenced in the flow but are not using the keyword beforeRouteLeave which actually made me miss it too. This PR changes that but I dont think I'm qualified to make the diagram :).

@kirillbunin
Copy link
Author

@kirillbunin kirillbunin commented May 9, 2018

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))

@rigor789
Copy link

@rigor789 rigor789 commented May 31, 2018

I have attempted to create a lifecycle diagram, but I don't think it is clear enough! Feedback welcome

lifecycle

@rigor789
Copy link

@rigor789 rigor789 commented Jun 1, 2018

@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!

@posva
Copy link
Member

@posva posva commented Jun 22, 2018

Sorry I haven't given you feedback on this yet. I'll likely check it in the following weeks/month

@rigor789
Copy link

@rigor789 rigor789 commented Jun 22, 2018

@posva no worries, take your time! 👍

@719media
Copy link

@719media 719media commented Jul 17, 2018

I'm fairly sure beforeRouteEnter doesn't get called if the component is re-used

@trainiac
Copy link
Contributor

@trainiac trainiac commented Dec 12, 2018

beforeRouteLeave also depends on whether the component is re-used.

@annymosse
Copy link

@annymosse annymosse commented Jul 11, 2019

does exist any update?(i loved this diagram too much)

@angeliski
Copy link

@angeliski angeliski commented Oct 10, 2019

Hey @posva You can give a feedback here?

@alvarosabu
Copy link

@alvarosabu alvarosabu commented Jul 23, 2020

@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.

@steven-prybylynskyi
Copy link

@steven-prybylynskyi steven-prybylynskyi commented Aug 7, 2020

My apologies, better will try to contribute instead of criticizing

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

No branches or pull requests

9 participants