Skip to content

Commit 1666909

Browse files
authored
docs: update sample code to replace deprecated <svelte:component> (#919)
1 parent b87845a commit 1666909

File tree

1 file changed

+2
-1
lines changed
  • apps/svelte.dev/content/tutorial/04-advanced-sveltekit/05-advanced-loading/01-universal-load-functions

1 file changed

+2
-1
lines changed

apps/svelte.dev/content/tutorial/04-advanced-sveltekit/05-advanced-loading/01-universal-load-functions/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ We can now use the `component` returned from these `load` functions like any oth
2929
<a href="/blue">blue</a>
3030
3131
+++ {#if $page.data.component}
32-
<svelte:component this={$page.data.component} />
32+
{@const Component = $page.data.component}
33+
<Component />
3334
{/if}+++
3435
</nav>
3536
```

0 commit comments

Comments
 (0)