Share
Differentiate Between Real DOM and Virtual DOM?
Question
REAL DOM
- It updates slow.
- DOM manipulation is very expensive.
- Can directly update HTML.
- Creates a new DOM if element updates.
- Too much of memory wastage.
VIRTUAL DOM
- It updates faster.
- DOM manipulation is very easy.
- Can’t directly update HTML.
- Updates the JSX if element updates.
- No memory wastage.UI is kept in memory.