Based on the component life-cycle diagram the the ‘render’ happens first.
The first thing will happen is mounting => When an instance of a component is being created and inserted into the DOM it occurs during the mounting phase.
This method is invoked immediately after a component is mounted. If you need to load anything using a network request or initialize the DOM, it should go here.
setState()
can be called hereProps: pass into a component and handled outside of the component and must be updated outside of the component. and cannot change it inside the component
State is handled inside of that component and you can update it inside the component. you can change it inside the component but need to re-render.
when we change the state inside of our application it’s going to re-render.
Store what they’re updating that value to and what they’re changing that value…