Comment by bdougherty
5 years ago
There is no diff going on with Svelte. And there doesn't need to be an in-memory representation of anything. Because it is compiling the code, it knows exactly what will change and in response to what.
https://svelte.dev/repl/7161f10f8eb645d8984fb231a0bc3982?ver...
For example in that repl, you can see that it makes a call to `$$invalidate` when the input value changes (see `input_input_handler()`) which triggers a `set_data` call (see `p()`) to update just the textNode that contains the name. This is what is meant by surgical. No other work is done other than what is required to update the specific places where a variable is used.
This is a cool approach, thank you for sharing that link.