~/talk

Goodbye, useEffect

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

Argues that useEffect is for synchronization only, not for every side effect, and that most "fire‑and‑forget" effects belong in event handlers or outside render. Shows concrete alternatives: useSyncExternalStore for subscriptions, frameworks or React Query for data fetching, and render-as-you-fetch or the upcoming use for suspending promises. Demonstrates replacing many tangled useEffects with a single statechart (XState) that models transitions and runs declarative actions like play, pause, close.

AI-written summary · about

  1. 0:00Introduction to Goodbye useEffect
  2. 1:08Why useEffect feels broken
  3. 3:38useEffect is not a lifecycle hook
  4. 6:26React 18’s double effect issue
  5. 7:31Synchronizing vs fire-and-forget effects
  6. 9:20Where action effects belong
  7. 12:07You might not need an effect
  8. 12:30No effect for derived state
  9. 14:40Parent communication without effects
  10. 16:03External store subscriptions
  11. 17:50Fetching data without effects
  12. 20:39Global singletons and SSR
  13. 22:04Handling user events
  14. 23:06Demo: State machines replace effects
  15. 29:15Summary and key 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.