3 ms·
Virtual DOMs are typically used to reduce the number of operations needed to update the real DOM. In order to achieve that, a virtual DOM is typically used to
by alnitak 10y ago
Virtual DOMs are typically used to reduce the number of operations needed to update the real DOM.
In order to achieve that, a virtual DOM is typically used to diff the previous and the next state of the DOM (before and after the data changes), and based on this diff calculate the shortest amount of steps to modify the real DOM to represent the new data.
While any DOM that doesn't render its tree can be considered a virtual DOM semantically speaking, the idiomatic usage of it so far is not achieved by this current work.
It is only confusing to the reader, who might have seen this term used in other popular projects.
I see this more as a DOM builder, similar to JSX for example.
- codr4life 10y agoWhich part of 'this is a foundation on which change-tracking and callbacks will be added as opt-in features' didn't you understand? It's a DOM and it's virtual, hence a virtual DOM.
- LoSboccacc 10y agoFoundations for a house isn't a house