If the value you need can be computed entirely from the current props or other state, remove that redundant state altogether.
If you’re worried about recomputing too often, the useMemo Hook can help.
If you want to reset the entire component tree’s state, pass a different key to your component.
If you can, update all the relevant state in the event handlers.
How would you initialize a piece of state that depends on a prop value, and why would you choose that approach?
If you notice a component re‑rendering twice after a button click that updates state, what could be causing it and how would you fix it?
When you need to update an object in state, how would you do it to avoid mutating the original state?
You’re adding a form with multiple input fields that share validation state. How would you structure the state, and what trade‑offs does your approach have?
During a sprint you discover that a component’s state is causing a memory leak when a subscription isn’t cleaned up. Walk me through how you’d debug and resolve it.
Explain why lifting state up to a parent caused a performance regression in a list component, and how you’d address it.
Our dashboard renders thousands of rows with per‑row expand/collapse state. How would you design the state management to keep the UI responsive?
We’re migrating from local component state to a global store. What criteria would you use to decide which pieces of state to move, and how would you ensure consistency?
Describe how you’d prevent unnecessary re‑renders when multiple components read the same slice of state, considering memoization and selector patterns.
Across several teams we have duplicated state handling logic for feature toggles. How would you create a shared, scalable solution while minimizing coupling?
Our legacy codebase mixes class component state, Redux, and React Context. Outline a migration plan to unify state management, addressing backward compatibility and developer onboarding.
When designing a library of reusable UI components, what conventions would you enforce for internal state vs. controlled props to ensure composability and testability?