Designing the In-Between States with Async React
summary
A broken Event Hub demo is rebuilt live using Next.js App Router and Async React primitives: Suspense with skeleton fallbacks and streaming unblocks pages, use cache to reuse server results removes some loading states, optimistic updates via useOptimistic and form actions make likes and questions instant, and view transitions plus transitionType nav forward/back animate navigations. Added polling with router.refresh and action prop pattern for interruptible transitions; deployed demo shows improved FCP, INP and CLS while raw network latency stays the same.
AI-written summary · about
chapters (12)
- 0:00Introduction to async React
- 1:59Understanding React render cycle
- 3:02Async React and transitions
- 4:27Fixing async data loading
- 7:38Designing loading states
- 8:41Caching UI parts
- 10:47Async navigation fixes
- 13:55Action prop pattern
- 16:21Async mutations with optimistic updates
- 23:03Reviewing improvements
- 24:28Core web vitals benefits
- 24:49Closing and resources
