DEV Community

Discussion on: What exactly is the DOM?!

Collapse
 
ben profile image
Ben Halpern

Nice overview.

You'll hear about the "virtual DOM" with frontend libraries like React. React pioneered of keeping a copy of the DOM available to make changes to so it can make bulk changes to the page in order to not slow things down.

It's kind of like making batch database writes for performance reasons instead of a bunch of small ones.

Just dropping that tidbit because for a lot of folks that might be the first they hear of DOM.

Collapse
 
karaluton profile image
Kara Luton

Thanks so much! I’m not super familiar with React (it’s on my todo list) so I learned something new too :)

Collapse
 
baso53 profile image
Sebastijan Grabar

Virtual DOM isn't just about rendering in batches. It's main use is to not (unnecessarily) render parts of the tree that don't receive new data, and to only render those that do.

Collapse
 
simo97 profile image
ADONIS SIMO

yeah sure ... here is an article about that and some Virtual DOM internals stuff.

dev.to/ycmjason/building-a-simple-...

thanks to : @ycmjason

Collapse
 
tiffany profile image
tiff

React team doesn't use "virtual DOM" anymore. Dan Abramov told me this in a DM when I tagged him in a React reconciliation post of mine. He said the team avoids the term and basically just state that React renders a tree of elements.