Do we need VDOM for fast rendering?
Would it be possible to make expressions that are re-evaluated only when their inputs change and bind them directly to real DOM?
I mean using immutable values and pure functions gives you the first (already used with react) and in the end VDOM mutates the DOM, so why not skip the VDOM altogether?
To better explain myself: VDOM takes two versions of the element tree, makes a diff and patches the DOM accordingly.
Why not take two versions of the state tree, diff that and patch DOM directly? What benefit the VDOM brings?
I remember that historically DOM used to be very slow on some browsers and virtual DOM was a huge performance boost. You could compute very quickly the difference in JavaScript and minimise the calls to the slow DOM browser API.
Now that Internet Explorer is really deprecated and DOM are fast enough in every browser, VDOM is not necessary.
I've written this library [1] as a clean reimplementation of a more complex beast we created for a (now dead) startup. Although the reimplementation has only seen very light use, we've used the concept extensively, and it's a joy to use. Take a look at the examples [2].
We don't need VDOM, but we can't live without it either. The problem is too many people are bought into not just React, but all of the open source components out there too (not a problem persay, it's created a ton of value for many). React does have an elegant API surface, not sure how possible is to keep that, but then somehow give it Svelte-like functionality. React is the golden handcuffs of front-end today.