beforeInvalidate
and afterInvalidate
events
#6375
Labels
feature / enhancement
New feature or request
Milestone
Describe the problem
I have a progress bar at the top of my site that appears upon every navigation that happens client-side (much like the one in kit.svelte.dev). I'm using the
beforeNavigate
andafterNavigate
events to show and then hide the progress bar.Occasionally I need to call
invalidate()
to re-run all the load functions (because the authentication status has changed, for example). I would like to show the same loader when the load functions are re-running as well — because when you think about it, runninginvalidate()
is kind of life refreshing the page.Describe the proposed solution
It would be nice if SvelteKIt provided two other lifecycle functions called
beforeInvalidate
andafterInvalidate
or something along those lines.Alternatives considered
No response
Importance
nice to have
Additional Information
No response
The text was updated successfully, but these errors were encountered: