~/talk

Let's understand suspense for data fetching

Talkat React Brussels 2022 · on Friday, 2022-10-14· [react, frontend-architecture]
slides:none on file

Demo builds a tiny data layer that uses React 18 Suspense to fetch jokes from a Dev Jokes API, showing three concrete strategies: render‑then‑fetch, fetch‑then‑render (module scope), and render‑as‑you‑fetch. It implements a createResource pattern that reads or throws the promise suspender, adds a 1.2s throttle to make latency visible, and uses useTransition to keep inputs responsive. The hack runs with yarn parcel in a 20‑minute demo and works as shown, but the claim is clear: use libraries in production, this is for learning.

AI-written summary · about

  1. 0:00Introduction and setup
  2. 2:06Why data fetching matters
  3. 7:19Three ways to fetch data
  4. 10:50Hands-on coding session
  5. 17:05Suspense for data fetching
  6. 23:08Selective UI updates with Suspense
  7. 26:20Prioritizing UI updates
  8. 28:34Summary and takeaways
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.