You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/runtime/samples/await-with-update/main.svelte

16 lines
344 B

<script>
import Component from './Component.svelte';
export let thePromise;
export let count;
export { Component }
</script>
<div>
{#await thePromise}
<p>loading...</p>
{:then theValue}
Resolved: <svelte:component this={theValue} {count} />
{:catch theError}
Rejected: <svelte:component this={theError} {count} />
{/await}
</div>