Re:The Svelte Compiler Handbook
by amelius on Sunday April 05, 2020 @05:35AM
(#22784718)
I skimmed through it, but couldn't find a description of the distinguishing feature of svelte, i.e. how the incremental updates are performed.
[ Parent
| on HN ]
From the same author, you may find this useful:
https://lihautan.com/compile-svelte-in-your-head-part-1/
I think the idea is to provide the programming model that React allows via its virtual DOM, but compile all that code away, so you end up with code das works without a virtual DOM.
Direct DOM interactions are faster and you don't have to bring a whole VDOM library.
Re:The Svelte Compiler Handbook
by PudgePacket on Sunday April 05, 2020 @05:53AM
(#22784780)
It's actually really easy to read the svelte compiler output! You'll see exactly how it works :P
I assume people downvoting this comment are not familiar with Svelte?
You can in fact see how it works by looking at the output. Go to the REPL at https://svelte.dev/repl/hello-world and select “JS output”.