Context API vs Redux
A frequent state-management question. They solve overlapping problems but aren't the same thing.
The difference
Context is a transport mechanism for passing a value down a subtree — it doesn't manage or optimise state. Redux is a full state container: a single store, pure reducers, selectors, middleware and devtools, with fine-grained subscriptions.
When to use each
Context (with useState/useReducer) is enough for theme, auth and locale. Reach for Redux (Toolkit) — or Zustand — for complex, high-churn global client state. For server data, prefer React Query/SWR over both.
Get state management right
Context, Redux, Zustand and server-state tools — with the judgement interviewers reward, in the React Interview Kit.
⚡ Get the React Interview Kit → ₹399Frequently asked questions
- Is Context a replacement for Redux?
- Not for complex state. Context alone re-renders all consumers on change; Redux enables selective subscriptions and centralised logic.
- What's the modern default?
- Local state + lifting + Context for most apps, React Query for server state, and a store (Zustand/Redux Toolkit) only when global state gets complex.
