This method is used during the mounting phase of the React lifecycle. ComponentWillMount componentWillMount is mounted before the render method and …