Replies: 3 comments 3 replies
-
You could call https://kit.svelte.dev/docs/modules#$app-navigation-invalidate |
Beta Was this translation helpful? Give feedback.
-
You could also use |
Beta Was this translation helpful? Give feedback.
-
You need the load function to subscribe to a url change by actually using the url in the load function. export const load = ({ url }) => {
url.pathname
} This tells kit that you want to rerun the function on path change |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I was trying out
+layout
files but they seem to run only on initial load (full page refresh), what i'm looking for is to run a check session function which makes an api request to the server on every route change (goto
andhref
), and then redirect them to/login
page if the session has expired, is this possible?Beta Was this translation helpful? Give feedback.
All reactions