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
The use: directive seems to be re-applied to elements that correspond to items in an {#each} when the array is modified, if the {#each} has a key. Un-keyed each blocks seem to work fine.
Each item has a directive that adds a click handler, and the click handler increases a number. If you click the "re-order" button it switches two elements in the array, and one of the nodes involved in the switch gets its click handler added again (so it will now increase the counter by 2 for each click).
The text was updated successfully, but these errors were encountered:
The
use:
directive seems to be re-applied to elements that correspond to items in an{#each}
when the array is modified, if the{#each}
has a key. Un-keyed each blocks seem to work fine.Example: https://svelte.dev/repl/783c29378ad0475485f11f82888d0cf1?version=3.6.9
Each item has a directive that adds a click handler, and the click handler increases a number. If you click the "re-order" button it switches two elements in the array, and one of the nodes involved in the switch gets its click handler added again (so it will now increase the counter by 2 for each click).
The text was updated successfully, but these errors were encountered: