The Mount Lifecycle
The mount lifecycle is called twice: before and immediately after React renders the component into DOM. Note that mounting alone happens only once; there is no scope in a React world where you can remount a React component into the DOM. When we say that React renders to the DOM, it means that this is when React processes the JSX, converts it to HTML, and shows it on the browser.
Mounting is where a lot of the functionality will take place specific to initializing a component's state at the time of loading. Mounting happens when your app loads up for the first time, when you navigate to a particular component using something like React router, or it could be something like when you add a component to a page dynamically, like through conditional renders or loops. The first one of these functionalities is one you should be very comfortable with at this point: the constructor.
constructor()
We have used the contructor(props)
method in previous exercises...