5TechG interview question

Lifecycle methods and Basic react