Hacker News new | ask | show | jobs
by Glench 2507 days 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?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

1 comments

Thanks! 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).