All courses
Course · Premium · Minimum Yearly plan
Client-Side State and Data Sync
Keep a page fast and correct when its data lives on a server. Query caches, normalized stores, server rendering, optimistic updates, sync and offline, one step at a time.
11
Lessons
85
Steps
About 2 hours
Duration
Your own
Pace
Short on time? Read the recap and interview answers
Curriculum
- 01UI state and server stateYearly or Lifetime planUI state belongs to the browser. Server state belongs to the server. Every component must see the same copy of it.
- 02Normalize repeated recordsYearly or Lifetime planEvery response that lists question 42 sends its own copy. A normalized store keeps one, by id.
- 03Query keys and shared requestsYearly or Lifetime planOne key per piece of server data. Everyone who asks for it shares one request.
- 04Stale-while-revalidateYearly or Lifetime planShow the cached copy at once, then check the server in the background.
- 05Server rendering: loaders first, a cache when neededYearly or Lifetime planWith SSR, loaders fetch on the server and rerun after a write. Add a client cache only where loaders fall short.
- 06Update or refetch after a writeYearly or Lifetime planA write leaves old copies in the cache. Update the ones you know, and refetch the rest.
- 07Optimistic updates and rollbackYearly or Lifetime planShow a change before the server confirms it, and undo it cleanly when the server says no.
- 08Out-of-order responsesYearly or Lifetime planThe last request you send isn't always the last response you get.
- 09Sync across tabs and devicesYearly or Lifetime planEvery tab and device has its own cache. Keep them in step with the server, and with each other.
- 10Persisted caches and offline writesYearly or Lifetime planA reload empties the cache. Save it in the browser, and keep writes made offline until the network returns.
- 11Choose where server data livesYearly or Lifetime planEvery option keeps server data right in its own way. Pick per kind of data, not once for the whole app.
- FinalThe data sync challengeYearly or Lifetime planTwelve questions from across the course. Pass it to claim your certificate.



