Skip to content

Which State Management? Explained

Answer a few questions about where the state lives, how big the app is, how often the state changes, and whether you need strict devtools to find the right React state approach: useState, Context, Zustand, Redux Toolkit, Jotai, or a server cache like React Query.

Most state mistakes come from picking a library before knowing what kind of state you have. The first fork is the source of truth: state that lives in one component, state shared across the app, and state that really belongs to the server and is only cached on the client. The answers below narrow from that fork to a concrete recommendation, ranked against the alternatives.

Decision guide · 6 options

The options

useState (local)

State that lives in one component and is passed down by props.

Small, local UI state: a toggle, an input value, a single form step. No library, no ceremony.

React Context

Shared state passed through the tree without prop drilling.

Low-frequency global values such as theme, locale, or the current user, where a change re-rendering all consumers is cheap.

Zustand

A small external store with a hook API and no boilerplate.

Medium apps that need shared, frequently-updating state without Redux's structure, and with fine-grained subscriptions that avoid extra re-renders.

Redux Toolkit

An opinionated store with middleware, devtools, and time-travel.

Large apps with many engineers who want a single source of truth, strict patterns, rich debugging, and predictable testing.

Jotai

Atomic state: tiny independent units that compose.

Apps where state is scattered and interdependent, and you want each component to subscribe only to the atoms it reads.

React Query / SWR (server cache)

A cache for data that really lives on the server.

Any state that comes from an API: loading, caching, refetching, and invalidation are handled for you, so you stop syncing server data into a client store by hand.

Which one fits you?

Answer a few questions to get a recommendation.

Question 1 of 4

Where is the state's source of truth?