1React has four built-in methods that gets called,
2 in this order, when mounting a component:
3
4constructor()
5getDerivedStateFromProps()
6render()
7componentDidMount()
8The render() method is required and will always be called, the
9others are optional and will be called if you define them.