3 ms·
To actually answer your question, no, $$invalidate doesn't mean all the DOM nodes get recreated. You can see that in this example: https://svelte.dev/repl/d3898
by Glench 7y ago
To actually answer your question, no, $$invalidate doesn't mean all the DOM nodes get recreated. You can see that in this example: https://svelte.dev/repl/d3898004792c467d8eacefb054d8263a?version=3.8.1 https://svelte.dev/repl/d3898004792c467d8eacefb054d8263a?ver...
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 https://svelte.dev/tutorial/keyed-each-blocks
- daoxid 7y agoThanks! For some reason it didn't occur to me that Svelte could just compare the new array to the old array (if this is how it's implemented).