Lightspeed interview question

How to optimise a component in ReactJS?