Problem Statement
Explain the lifecycle of a React component (mount, update, unmount).
Explanation
React component lifecycle includes three phases: Mounting (component created and added to DOM), Updating (re-render due to state/prop changes), and Unmounting (component removed from DOM). Hooks like useEffect can handle these phases in functional components.