Skip to content

Commit 324a5c0

Browse files
Rich-Harrisgithub-actions[bot]
authored andcommitted
sync svelte docs
1 parent 8156c4b commit 324a5c0

File tree

1 file changed

+9
-0
lines changed
  • apps/svelte.dev/content/docs/svelte/03-template-syntax

1 file changed

+9
-0
lines changed

apps/svelte.dev/content/docs/svelte/03-template-syntax/05-await.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,12 @@ Similarly, if you only want to show the error state, you can omit the `then` blo
6868
<p>The error is {error}</p>
6969
{/await}
7070
```
71+
72+
> [!NOTE] You can use `#await` to render dynamic components with the help of the `import()` function:
73+
>
74+
> ```svelte
75+
> {#await import('./Component.svelte') then Component}
76+
> <Component.default />
77+
> {/await}
78+
> ```
79+

0 commit comments

Comments
 (0)