Member-only story
REACT VS REACT DOM
What Does React do?
To answer the above question, let’s go through the below points for understanding React better.
- React is a JS library which builds UI interfaces.
2. It manages state, props and context which are core concepts of React .
3. It understands component but doesn’t care about the HTML elements mentioned in it.
4. Whenever there is a change in state or props , it uses the concept of VirtualDom using diffing algorithm to create updated blueprint of Dom by comparing previous virtual snapshot with the latest one and passes this blueprint to the ReactDOM.
5. React doesn’t care about the Real Dom.
What does ReactDom do?
- In simple words, ReactDom is kind of mediator between React and RealDom (Browser).
- ReactDom receives the updated blueprint from React and inserts the changes to the places required in RealDom , without re-rendering the whole Dom into browser. This way it avoid unnecessary re-rending of RealDom which is an expensive task in terms of page re-loading as it slows it down.





