Export a load function from +page.js to prepare data. Here, /api/lists stands for your own JSON API, returning an array of lists with id and name fields.
/** @type {import('./$types').PageLoad} */
export async function load({ fetch }) {
const response = await fetch('/api/lists');
return {
lists: await response.json(),
};
}