Virtual DOM

Virtual DOM is ...

The DOM was often used to store state: this just isn't an efficient approach.

The DOM is fast, but page refreshes or reflows may be slow.

If a DOM manipulation is poorly conceived, this may lead to performace problems: this idea gave birth to the myth that the DOM is slow.

The Virtual DOM is an improvement because it allows to consolidate multiple changes into a single DOM operation.

With the 2 way bindings approach, changes could trigger many computations where each would trigger re-renders. React bundles all such operations into a single rerender.

lit-html lets you write declarative UI without diffing. It has an almost 1-to-1 correspondence with JSX, but by utilizing the static/dynamic split it doesn't have to do VDOM diffs.

Template Instantiation.