// src/routes/posts/+page.js export async function load({ fetch }) { const res = await fetch('https://jsonplaceholder.typicode.com/posts'); const posts = await res.json(); return { posts }; // becomes the page's `data` prop }