|
|
|
|
|
by barrkel
2232 days ago
|
|
A virtual DOM doesn't necessarily imply DOM existence; I don't buy that. It really depends on how persistent you want your "virtual" to be. A virtual DOM, to me, means that the application renders by, every time, constructing data structures which are handed off to be reconciled with the display. If, as in an HTML application, you render by means of a retained mode real DOM, then the reconciliation is via comparison of the virtual with the real. But that's not the only way to handle the output of the construction of a virtual DOM; it could figure out how those structures intersect with the dirty rectangle/s, and only render the subtree of the DOM which applies. rxi's technique resembles a virtual DOM of depth 2 (1 root and everything is a child) and absolute positioning, though it's even closer to an OpenGL display list or combined vertex & command buffer. For that reason, I think it's a little bit of a stretch; not on the virtual DOM angle, but on the not particularly DOM-like nature of the drawing commands. |
|
That's wrong. virtual DOM is always a parallel structure to real DOM - projection of it. That's by definition of it.
From vDOM authors: https://reactjs.org/docs/faq-internals.html
> The virtual DOM (VDOM) is a programming concept where an ideal, or “virtual”, representation of a UI is kept in memory and synced with the “real” DOM