Passing Component props

Pass

<MyComponent {id} />

Receive and define

let  { id }: {id: string} = $props()

Fetching

Send from server

import { fetchPosts, fetchUsers } from '$lib/notion/data';
import type { LayoutServerLoad } from './$types';
 
export const load: LayoutServerLoad = async ({}) => {
	return await fetchPosts();
};
 

Receive in component

const { data } = $props();