Differences between the Real DOM and Virtual DOM
Real DOM | Virtual DOM |
---|---|
It updates slower | It updates faster |
Can directly update HTML | Cannot update HTML directly |
Creates a new DOM if element updates | Updates the JSX if element updates. |
DOM manipulation is very expensive. | DOM manipulation is very easy. |
Too much memory wastage | No memory wastage. |