Explain how useEffect can be used to replicate the functionality of component lifecycle methods. | useEffect | react Interview Questions | NextRound.in