<script>
const sleep = (ms) => new Promise((res,rej) => setTimeout(res,ms))
let name = 'world';
let data = sleep(1000);
</script>
{#await data}
some flashing cards visual
{:then data}
cards filled with data
<button on:click={() => data = sleep(2000)}>
sumbit
</button>
{/await}