Problem Statement
Describe common lifecycle methods in React Native class components.
Explanation
React Native class components share lifecycle methods with React. Key ones include:
- **componentDidMount()** → called once after initial render, good for fetching data.
- **componentDidUpdate()** → runs after updates.
- **componentWillUnmount()** → cleanup work like clearing timers or listeners.
These methods are now replaced by hooks like useEffect in functional components.