React has four built-in methods that gets called,
in this order, when mounting a component:
constructor()getDerivedStateFromProps()render()componentDidMount()Therender()methodisrequiredandwillalwaysbecalled, theothersareoptionalandwillbecalledifyoudefinethem.