Your question is React Component Lifecycle and Side Effects. 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).
Explain the lifecycle of a React.js component and how you manage side effects. Cover both modern function components using useEffect and the equivalent lifecycle phases in class components. Explain when effects run, how cleanup works, and how dependency arrays affect behavior. Keep the discussion focused on React.js in the browser, including development behavior under React.StrictMode.