When to Use a Store

When an Application Needs a Store

Most React 7,897 applications do not need Redux 3,824 , and the Redux team says so in its own documentation. React's own answers — useState for local values, lifting state up for two siblings (Lifting State and Keys), context plus useReducer for a tree-wide value that changes rarely (Context and Reducers) — cover most of them. Reach past those only on a symptom.

Three symptoms justify a store. Distance: a value is edited in one corner of the tree and read in another, through a dozen components that only forward it. Volume of transitions: the same state changes from many places by many rules, and you want those rules in one named file. Inspectability: you need the exact sequence of changes behind a bug report, which Redux DevTools 14,368 gives you and nothing in React does.

One symptom that looks like a store problem and is not: server data. A products list fetched from an Express 24,430 API is not application state; it is a cache of somebody else's, needing deduplication, background refetching and invalidation more than reducers. Use a query library — RTK Query (Queries with RTK Query) or TanStack Query 79,069 (TanStack Query) — and keep the store for what is yours.

The honest comparison with context and useReducer is narrow. Both already give you dispatch and a pure reducer, and context gives you distance. Redux adds middleware, a DevTools timeline, memoized selectors that stop unrelated components re-rendering, and a store outside the React tree that non-React code can read. On a small team with a handful of values, context wins; when several teams share one application, the store usually does, because "what can change this value?" has a grep-able answer. None of it is all-or-nothing: form inputs belong in useState even when the cart lives in Redux.