Whenever you're ready, walk me through how you'd approach this.
How do you manage complex, nested state in a React application without sacrificing rendering performance? Explain how you would choose between local state, useReducer, Context, and an external store, and how you would prevent unrelated components from rerendering. Keep the answer focused on React rendering behavior, state structure, referential equality, memoization, and practical profiling techniques.