|
|
|
|
|
by daoxid
2507 days ago
|
|
The article says that items = items.filter(i => i !== item);
is compiled to $$invalidate('items', items = items.filter(i => i !== item));
So this invalidates the whole array, right? Would this then re-render the whole array, i.e., remove and recreate all DOM nodes? And if so, does Svelte support more fine-grained ways to update arrays? |
|
Also, Svelte has keys like React which can help out. See this example in the tutorial for that: https://svelte.dev/tutorial/keyed-each-blocks