React working mechanism

React components Rendering

React is a JavaScript library for building user interactive interfaces.
A react app is build with composition of components which is piece of the user interfaces
React keep lightweight representation of Dom in memory which is refers to as virtual Dom .Unlike the browser the real Dom it is cheap to create. When we change a state of a component we get a new react element. react will then compare between new and the older element and keep the update to the real Dom to the browser. So when the state change in virtual Dom then then the react Diffing Algorithm change the update to the real dom.

--

--