Related topics

Linking notes

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.