Accenture interview question

React basics- hooks, optimization technique