Related topics
Linking notes
-
Sveltekit, page data:atomic made on 9:23 AM - September 09, 2024
-
Sveltekit, layout data:atomic made on September 09, 2024
-
Sveltekit, fetch requests:atomic made on September 09, 2024
-
Sveltekit, cookies:atomic made on September 09, 2024
-
Sveltekit, context API:atomic made on September 09, 2024
-
Sveltekit, URL data:atomic made on September 09, 2024
-
Sveletekit, authorisation:atomic made on September 09, 2024
When does a load function run?
Server load functions always run on the server first. Universal load functions (A.K.A server.js files) will run on the server first during SSR and then subsequent navigation will be run on the client - however, the client will reuse fetch responses.
What can be returned in a load function?
A load function can return an object containing any values.
It can also return custom classes and component constructors.