Skip to content

Commit 772cd63

Browse files
Update sveltekit.tsx - to svelte 5 syntax (#1986)
* Update sveltekit.tsx - to svelte 5 syntax In Svelte 5, content can be passed to components in the form of snippets and rendered using render tags. In legacy mode, content inside component tags is considered slotted content, which can be rendered by the component using a <slot> element https://svelte.dev/docs/svelte/legacy-slots --------- Co-authored-by: Philipp Spiess <hello@philippspiess.com>
1 parent 170ee94 commit 772cd63

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/app/(docs)/docs/installation/framework-guides/sveltekit.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,12 @@ export let steps: Step[] = [
9898
lang: "svelte",
9999
code: html`
100100
<script>
101+
let { children } = $props();
101102
// [!code highlight:2]
102103
import "../app.css";
103104
</script>
104105
105-
<slot />
106+
{@render children()}
106107
`,
107108
},
108109
},

0 commit comments

Comments
 (0)