Goodbye, useState
summary
Argues that useState should no longer be the default for growing apps and shows concrete alternatives: use server components and Suspense or TanStack Query to remove loading booleans, use use-search-params or URL search parameters for persistent UI state, swap refs for click counters to avoid rerenders, prefer native form data (or React Hook Form + Zod) over countless input setStates, use discriminated unions instead of separate loading/error flags, useReducer for constrained logic, and useSyncExternalStore or small stores (Zustand / xate store) for shared state; demos and patterns all work in practice.
AI-written summary · about
chapters (12)
- 0:00Introduction to state
- 1:37State weirdness and basics
- 4:24Controlling re-renders
- 6:06URL as state
- 8:22Data fetching patterns
- 12:00Form management
- 17:05Reducing overused state
- 20:00Derived state and unions
- 22:35Managing complex logic
- 25:40External stores
- 28:01State management libraries
- 30:36Local-first and conclusion








