profile
viewpoint

Ask questionsKeyed {#each} block inside {#await}

Not sure if this is a bug but looks like the key in each block doesn't help much in await block

{#await promise}
    Loading
{:then arr}
    {#each arr as item (item.id)}
        <div>hello</div
    {/each}
{/await}

I had animation in hello div and it starts all over again on all items when I reassign the promises value. When I tried with just each block and the async code in script tags, only the added item got rerendered.

sveltejs/svelte

Answer questions antony

Hi @edreal

Please use the issue template, and provide a REPL example for your issue so that we can investigate the cause of your issue. The code you have supplied isn't valid code.

useful!

Related questions

Javascript Interpolation in Styles via CSS Variables? hot 2
Svelte applications fail to load in IE 11. Similar loading issue with the main site svelte.dev hot 1
Uncaught TypeError: y.fragment.l is not a function hot 1
Increase elements when using a combination of await block and transition hot 1
Svelte applications fail to load in IE 11. Similar loading issue with the main site svelte.dev hot 1
Change body class via &lt;svelte:body /&gt; hot 1
Site: Svelte Cookbook/ Examples hot 1
Missing dependencies in svelte/compiler type definitions hot 1
Multiple components in one file - svelte hot 1
onMount Error: Function called outside component initialization hot 1
A way to see if slot prop is present hot 1
slot inside #if inside #each : TypeError cannot read property 'd' of null hot 1
unclear / difficult to import uuidv4 hot 1
Use <script type="application/ld+json"> in <svelte:head> hot 1
Error: 'default' is not exported when using babel + moment hot 1
Github User Rank List