EY interview question

React life cycle methods