Infogain interview question

React Lifecycle Method with Class as well as Functional Components.