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
Looks like the relation between the loop pass and the actual dom element is not kept, so the 3rd and 4th input box are removed though the 2nd and 3rd should have been removed.
Update:
The same thing happens in React when no key is provided to the root element of each loop pass.
In React though it is enforced that there is only one root element in each iteration whereas in svelte this is not necessary.
The text was updated successfully, but these errors were encountered:
Using keys is also the approach taken by the incremental-dom lib (whose philosophy is somewhat related to svelte, that is, update the DOM directly, buy the nodes that require it):
svelte-cli version 1.0.4
template:
bootstrap:
Reproduce:
Expected:
Actual:
Looks like the relation between the loop pass and the actual dom element is not kept, so the 3rd and 4th input box are removed though the 2nd and 3rd should have been removed.
Update:
The same thing happens in React when no
key
is provided to the root element of each loop pass.In React though it is enforced that there is only one root element in each iteration whereas in svelte this is not necessary.
The text was updated successfully, but these errors were encountered: