You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that in runes mode you get the error "Cannot reassign or bind to each block argument in runes mode. Use the array and index variables instead (e.g. 'array[i] = value' instead of 'entry = value')", and if you rewrite the Svelte 5 repro to that style, it works. E.g. if the each block looks like this:
{#each $checks as checked, i}
<inputtype="checkbox" bind:checked={$checks[i]}/>
{/each}
Then the derived store is updated correctly, in both runes and non-runes modes.
* fix: invalidate store when mutated inside each block
fixes#10771
* Update packages/svelte/src/compiler/phases/3-transform/client/visitors/template.js
Describe the bug
In the following code snippet I expect the store
countChecked
to be recalculated wheneverchecks
is modified:It works on Svelte 4 but is broken on Svelte 5.
Reproduction
Svelte 5 REPL • Svelte 4 REPL
Logs
No response
System Info
Severity
blocking an upgrade
The text was updated successfully, but these errors were encountered: