Infosys interview question

React Life cycle react hooks hoisting closure