From 4cc7e0e112a5f6f7c455e6209c3feee9d20f7714 Mon Sep 17 00:00:00 2001 From: Simon H <5968653+dummdidumm@users.noreply.github.com> Date: Mon, 28 Oct 2024 15:49:35 +0100 Subject: [PATCH] Update documentation/docs/03-template-syntax/05-await.md --- documentation/docs/03-template-syntax/05-await.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/documentation/docs/03-template-syntax/05-await.md b/documentation/docs/03-template-syntax/05-await.md index 4fb48c8043..5857244b8e 100644 --- a/documentation/docs/03-template-syntax/05-await.md +++ b/documentation/docs/03-template-syntax/05-await.md @@ -68,12 +68,11 @@ Similarly, if you only want to show the error state, you can omit the `then` blo

The error is {error}

{/await} ``` -Also you can render dynamic components with the help of import() function. -```svelte -{#await import('./Component.svelte') then Component} - -{/await} -``` - -> [!NOTE] You need to add `.default` since components export a default only. +> [!NOTE] You can use `#await` to render dynamic components with the help of the `import()` function: +> +> ```svelte +> {#await import('./Component.svelte') then Component} +> +> {/await} +> ```