6 ms·
This has changed my entire perception of the field. See, I had always thought that virtual DOM was one or two things: the building of the underlying structure
by jimmygrapes 5y ago
This has changed my entire perception of the field.
See, I had always thought that virtual DOM was one or two things: the building of the underlying structure as a separate list of nodes from what is displayed, and separately, a sort of buffered visual rendering on the (presumably more powerful) server that was used to determine exactly which elements needed to be rendered for the given view, then passing the associated DOM tree nodes to the browser for actual rendering. Kinda like double buffering and depth culling I guess?
Is there some thing that does this and I've just been getting ideas confused all this time?
- aidenyb 5y ago> the building of the underlying structure as a separate list of nodes from what is displayed This is how the Virtual Node tree is constructed. One case could be a React.createElement call that creates a virtual div node. You can visualize it by going to this page (Scroll down to the REPL section): https://millionjs.org/docs/api/basics/m https://millionjs.org/docs/api/basics/m > a sort of buffered visual rendering on the (presumably more powerful) server that was used to determine exactly which elements needed to be rendered for the given view, then passing the associated DOM tree nodes to the browser for actual rendering This is called hydration: https://en.wikipedia.org/wiki/Hydration_(web_development) https://en.wikipedia.org/wiki/Hydration_(web_development)