DEV Community

Discussion on: Javascript DOM Manipulation to improve performance

Collapse
 
_developit profile image
Jason Miller 🦊⚛

Mutating a disconnected tree is cheaper than a connected one because it has no chance of causing side effects like layout. So you build up the largest possible disconnected tree, then "commit" all those mutations by attaching its root.