Most state problems in React apps come from treating every piece of data the same way. Data fetched from a server, the current filter in the URL, a half-filled form and an open modal each need different handling. This course sorts state into those categories and teaches the best-fit tool for each, so your app stays fast and your components stay simple.

What you'll learn

  • The kinds of state: server, client, URL, form and derived, and where each should live
  • When built-in tools like useState, useReducer and context are enough
  • TanStack Query: query keys, caching, stale time, background refetching and retries
  • Mutations, optimistic updates and cache invalidation with TanStack Query
  • Pagination, infinite lists and prefetching for faster navigation
  • Zustand stores, selectors, slices and middleware such as persist
  • Redux Toolkit: createSlice, the store, typed hooks and DevTools
  • RTK Query as an alternative for teams already using Redux
  • Keeping filters, sorting and tabs in the URL with search params
  • Avoiding unnecessary re-renders and measuring with React DevTools

Who it's for

  • React developers whose apps have grown tangled with context and prop drilling
  • Teams deciding between Redux, Zustand and a server-state library
  • Developers maintaining a large Redux codebase who want modern patterns

Prerequisites

Outcomes

By the end of this course you will be able to:

  1. Classify the state in any React app and put each piece in the right place.
  2. Replace hand-written fetching code with TanStack Query, including mutations and caching.
  3. Build small, focused client stores with Zustand or Redux Toolkit.
  4. Diagnose and fix re-render and stale-data problems.

Course outline

ModuleTopic
1Types of state and why it matters
2Built-in React state: local, lifted and context
3TanStack Query fundamentals: queries and keys
4Caching, stale time and refetching
5Mutations, optimistic updates and invalidation
6Pagination, infinite queries and prefetching
7Zustand: stores, selectors and middleware
8Redux Toolkit: slices, store and typed hooks
9RTK Query and migrating legacy Redux
10URL state and form state
11Performance, DevTools and testing state
12Project: refactoring a messy app into clear state layers

FAQ

Do I still need Redux in 2026?

Often not. Many apps only need a server-state library and a little local state. Redux Toolkit is still a solid choice for large apps with complex client-side logic, and the course helps you decide.

Why learn both Zustand and Redux Toolkit?

You will meet both in real projects. They solve similar problems with different trade-offs, and seeing them side by side makes the choice clearer.

Does this work with Next.js or React Router?

Yes. We cover how these libraries fit with server rendering, including hydrating TanStack Query caches from server-loaded data.

How do I join?

Get in touch and we'll share the current format, schedule and enrolment details.