-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
docs: clarify onNavigate's full-page navigation behaviour
#10694
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
Conversation
|
|
|
||
| /** | ||
| * A lifecycle function that runs the supplied `callback` immediately before we navigate to a new URL. | ||
| * A lifecycle function that runs the supplied `callback` immediately before we navigate to a new URL, except during full-page navigations. |
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.
It seems odd to me that we'd mention it only on this one and not on the other lifecycle functions
| * A lifecycle function that runs the supplied `callback` immediately before we navigate to a new URL, except during full-page navigations. | |
| * A lifecycle function that runs the supplied `callback` immediately before we navigate to a new URL except during full-page navigations. |
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.
before/afterNavigate mention that it occurs we navigate to a new URL, which I read as including full-page navigations. Happy to clarify it by mentioning that they run on full-page navigations?
onNavigate's full-page navigation behaviour
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
given that
beforeNavigateandafterNavigateare fired even on links withdata-sveltekit-reload, initially I found it a bit confusing thatonNavigatedidn't, so it might be good to clarify that in some of the docs.