DEV Community

Discussion on: 5 things I love about Svelte

 
dceddia profile image
Dave Ceddia

Svelte is pretty much compiled down to setting element.innerText = “new value” directly, instead of doing it through a VDOM. In the Svelte REPL, check out the compiled output - it’s pretty readable! - and look for the code that looks like your own update code (e.g. if you write “name = whatever” somewhere, that’ll be in the output somewhere, along with the actual DOM update code)

Thread Thread
 
mauro_codes profile image
Mauro Garcia

Thanks for this comment Dave! A few hours ago I saw the video that @somedood shared above in the comments and in that video Rich Harris shows exactly what you are saying (the output in the REPL).
The output is super clean and easy to read compared to the code generated by frameworks like Angular.