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,useReducerand 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
- Comfortable building React components with hooks and TypeScript (see React & TypeScript Fundamentals)
- Experience fetching data from a REST API
Outcomes
By the end of this course you will be able to:
- Classify the state in any React app and put each piece in the right place.
- Replace hand-written fetching code with TanStack Query, including mutations and caching.
- Build small, focused client stores with Zustand or Redux Toolkit.
- Diagnose and fix re-render and stale-data problems.
Course outline
| Module | Topic |
|---|---|
| 1 | Types of state and why it matters |
| 2 | Built-in React state: local, lifted and context |
| 3 | TanStack Query fundamentals: queries and keys |
| 4 | Caching, stale time and refetching |
| 5 | Mutations, optimistic updates and invalidation |
| 6 | Pagination, infinite queries and prefetching |
| 7 | Zustand: stores, selectors and middleware |
| 8 | Redux Toolkit: slices, store and typed hooks |
| 9 | RTK Query and migrating legacy Redux |
| 10 | URL state and form state |
| 11 | Performance, DevTools and testing state |
| 12 | Project: 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.