Modern State Management

State management stopped being a single “pick Redux or Context” decision years ago. In 2026 the question is sharper: what kind of state is this, and which layer of the stack already owns it? Server Components, mature routers, and libraries that treat remote data as a cache—not a pile of useEffect calls—have collapsed a lot of what used to live in global stores. What remains on the client is mostly UI coordination, ephemeral interaction, and data that truly cannot be derived from the network or the URL.

This chapter walks through a practical map of that landscape. You will see when TanStack Query should be the default for anything that crosses the wire, when Zustand is the smallest honest answer for shared client UI, when Jotai’s atoms pay off for fine-grained graphs of derived and async state, and how to combine those tools without turning every screen into a bespoke architecture exercise.

We also stay close to TypeScript: stores and queries should narrow correctly at the point of use, shared options should infer data types without ceremony, and you should be able to refactor keys and fetchers without a trail of as assertions.

The sections that follow go from judgment (where each tool belongs) to mechanics (patterns that scale in real codebases). If you take one idea from the chapter intro, let it be this: if the value could be reconstructed from the URL, a server response, or a pure function of props—do not promote it to a client state library. The best store is often no store at all.