Goodbye, useState
summary
Argues that apps outgrow plain useState and shows concrete replacements: keep non-rendering counters in refs, put UI state into the URL via query params or a useQueryState-style swap, fetch with React 19 features or useTransition instead of manual isLoading flags, or use TanStack Query for client caching. Recommends FormData + server actions for forms, discriminated unions for status/type safety, useReducer/event dispatch for complex logic, and useSyncExternalStore plus useSyncExternalStore or XState-like stores and localβfirst sync engines for shared/global state.
AI-written summary Β· about
chapters (12)
- 0:00Intro
- 3:28UseRefs
- 4:43URL State
- 7:12fetching data
- 9:24forms
- 11:37overusing state
- 13:11discriminated unions
- 14:22derived states
- 15:15reducing logic
- 17:21syncing external stores
- 19:44thirdparty libraries
- 22:39sync engines
related talks
32mGoodbye, useState
17mManaging React State: 10 Years of Lessons Learned
01h 00mEffective React: Lessons from 10 Years
28mThe State of React State in 2019
33m2024 09 20 18 DAVID KHOURSHID - useWat
30mManaging State Management
29mReact Query: Itβs Time to Break up with your "Global State"!
40mReact State β The Good, the Bad and the Ugly
