Differentiate Between Real DOM and Virtual DOM?

Question

REAL DOM

  1. It updates slow.
  2. DOM manipulation is very expensive.
  3. Can directly update HTML.
  4. Creates a new DOM if element updates.
  5. Too much of memory wastage.

VIRTUAL DOM

  1. It updates faster.
  2. DOM manipulation is very easy.
  3. Can’t directly update HTML.
  4. Updates the JSX if element updates.
  5. No memory wastage.UI is kept in memory.

3 years 2021-07-24T17:29:37+00:00 21 views 1