Your question is Explain React Lifecycle and State Management. Take a moment with it on the right.
Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).
Tell me about the lifecycle methods in React and how you manage component state.
Explain both class component lifecycle methods and the function component model using useState, useReducer, and useEffect. Cover mounting, updating, unmounting, rendering versus committing, effect cleanup, and the distinction between props and state. Focus on React for web applications, including current function-component practices and legacy class lifecycle APIs.