-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Visualized the text content of the "The Full Navigation Resolution Flow" section. #1486
base: main
Are you sure you want to change the base?
Visualized the text content of the "The Full Navigation Resolution Flow" section. #1486
Conversation
…d/navigation-guards.md" document: "The Full Navigation Resolution Flow".
✅ Deploy Preview for vue-router ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pretty neat! Do you have the editable file? We should remove the vue lifecycle hooks on the right (beforeUpdate and update) as there is no guarantee they will happen.
Also note beforeRouteLeave happens first and that beforeRouteEnter's next happen after DOM updates but there is no guarantee it's exactly after mounted or any other lifecycle hook
- Removed misleading Vue lifecycles - More detailed router flows
Image changed:
Add content:
There are no editable files, but the images were made in Figma.
This is likely to be understood by users through more detailed images and examples. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- beforeRouteLeave happens at the very beginning, before beforeEach.
- There isn't a
isFailed
scenario. It's a pipeline that any navigation guard can stop at any time: it doesn't branch. I think it's much easier to just keep one timeline / one vertical arrow - Between beforeResolve and afterEach the navigation is confirmed
- The last part should really become DOM updates instead of setup/mounted/beforeUnmount because there is no guarantee in the order of these compared to the router
- beforeRouteEnter next happens after that
- Flow modified
Image changed:
PS. |
Has changed file any problems? |
Thanks a lot, I will get back to this later on once I update vue router docs. |
Visualized the text content of the last section of the "guide/advanced/navigation-guards.md" document: "The Full Navigation Resolution Flow".
If there is no problem with the content, it seems easier to understand than the text.
If you decide to use this image, duplicate it on the vue team's figma.
The figma link annotations in the documentation also need to be corrected.
If there are any problems, please reject this PR (with comments).