Nagarro Interview Question

How useeffect can be used as life cycle chain methods