-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Describe the problem
The docs for invalidate at https://kit.svelte.dev/docs/modules#$app-navigation-invalidate say
Causes any
loadfunctions belonging to the currently active page to re-run if theyfetchthe resource in question.
The way it is written, it sounds like "if load calls fetch with URL X, then invalidate(X) reloads the page".
However, observed behavior is that you can also invalidate the page itself.
https://stackoverflow.com/questions/71743867/refresh-current-page-in-sveltekit
I think this should be explicitly documented, both for discoverability and to say that that is the intended behavior, not a random side effect that might go away.
Describe the proposed solution
Causes any
loadfunctions belonging to the currently active page to re-run if theyfetchthe resource in question, or if the current page URL is invalidated.
Alternatives considered
Do only what the docs promised, but then something else needs to provide the reload functionality -- not a good idea, and breaks existing code.
Importance
would make my life easier
Additional Information
No response