Load functions
Fetch data before a page renders.
A +page.server.js file exports a load function. It runs on the server, can talk to your database directly, and returns an object.
That object is handed to your page as the data prop, so the page itself stays simple.
Because it runs before rendering, the HTML sent to the browser already contains your content, which is great for SEO.