by slumdev · 5y ago · 0 comments
> It's important to understand that virtual DOM isn't a feature. It's a means to an end, the end being declarative, state-driven UI development.
Declarative, state-driven UI development is a valuable abstraction.
I really hope readers take this to heart, rather than the article title becoming a new meme.
> it turns out that we can achieve a similar programming model without using virtual DOM — and that's where Svelte comes in
The abstraction is valuable, but its cost need not be so high. I do wish they'd elaborate on what Svelte does differently though, or link to another post which elaborates.
The "Rethinking" post gives a little more detail:
> Instead, Svelte runs at build time, converting your components into highly efficient imperative code that surgically updates the DOM. As a result, you're able to write ambitious applications with excellent performance characteristics.
https://svelte.dev/blog/svelte-3-rethinking-reactivity
Seems like a great idea, if it can gain the critical mass required and build a community of people developing code for it.
Which browsers do not support natively for decades and entire markets of ecosystems grow to work around that stupidest fact. Browsers could detect, batch and “reconcile” (whatever that means) the changes to the js runtime with much less runtime and devtime overhead than it is done in js by manual state tracking and updates.