Accenture interview question

Coding question based of object React life cycle methods