Nagarro interview question

How useeffect can be used as life cycle chain methods