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/context-in-await/main.svelte

14 lines
227 B

<script>
import { setContext } from 'svelte';
import Child from './Child.svelte';
setContext('test', 123);
export let promise = Promise.resolve();
</script>
{#await promise}
<p>...waiting</p>
{:then}
<Child />
{/await}