Svelte and SvelteKit 5 · SvelteKit

Use the loaded data

Read the load function's result through the data prop.

<script lang="ts">
  let { data } = $props();
</script>

<h1>{data.post.title}</h1>

Official Svelte and SvelteKit 5 documentation

More sveltekit commands

All sveltekit commands · Svelte and SvelteKit 5 cheatsheet

Was this page helpful?