DOM Manipulation is the process by which one can dynamically change the content of the web page. Working with DOM should be fairly easy and quick as it is always tree-structured, traversing the DOM is easy.
In React, changes are made to the 
Virtual DOM
 and then synced to the React DOM. This process is call Reconciliation. React can figure out which objects have been changed, and this process is called drifting.

Process of DOM manipulation

Example of Diffing Algorithm

React will delete the tree, and rebuild the entire tree again.
Only the difference will be found in the attribute and will be changed accordingly.
The new element will be added to the end of the list.
As the new element is added to the beginning it will be rebuilding the entire list again.
☕Thanks For Reading | Happy Coding🤨
I have written over 130+ Article on https://rahulism.tech