Closed
Description
Describe the bug
{#each expression as name (key)}...{/each}
The issue is that the behavior of key
in the above syntax is different in Svelte 4 and 5.
It took a lot of time to lock in to this and make an intuitive minimal reproduction.
Strangely, somehow it couldn't be reproduced in the official Svelte5-REPL
, so I had to use StackBlitz
to provide an online preview.
You can see in the demo how the actual rendering of the component elements behaves differently when changing the order of the array elements.
Reproduction
StackBlitz-svelte-5.0.0-next.108
Svelte5-REPL (Unable to reproduce)
svelte5.0.0-next.108.mp4
Logs
No response
System Info
svelte: 5.0.0-next.108
Severity
blocking an upgrade