Whenever you're ready, walk me through how you'd approach this.
How do you manage state transitions in a complex ReactJS application? Explain how you choose between useState, useReducer, Context, and an external store, and how you keep transitions predictable as components and asynchronous work interact. Focus on React 18+ with functional components, including immutable updates, derived state, side effects, and race conditions.