Pages

Virtual DOM In React JS

Virtual DOM

Virtual DOM is in-memory representation of Real DOM. It is lightweight JavaScript object which is copy of Real DOM.

Updating virtual DOM in ReactJS is faster because ReactJS uses

  1. Efficient diff algorithm
  2. Batched update operations
  3. Efficient update of sub tree only/difference only
  4. Uses observable instead of dirty checking to detect change