sveltejs/svelte

Async component rendering bug with #each

Opened this issue · 0 comments

Describe the bug

The rendered state doesn't update. Not sure what the exact issue is.

Reproduction

REPL

<script>
    let value = $state("Apple");

    const foo = $derived(await value);
    const bar = $derived(foo === value && [0]);
</script>

<select bind:value>
    <option value="Apple">Apple</option>
    <option value="Banana">Banana</option>
</select>

{#each bar}
    Selected fruit: {value}
{/each}

Logs

System Info

Svelte playground

Severity

annoyance