~/talk

Are we React-ing wrongly?

Talkat ReactNext 2023 · on Tuesday, 2023-06-27· [react, frontend-architecture]
slides:none on file

Argues React hooks get overused and shows measurable harms: useMemo adds >10ms to first render for 1,000 items while re-renders stay under 1ms, useCallback builds cached function versions that accumulate and leak memory, and console.time profiling shows only ~0.2–0.5ms savings for memo in many cases. Demonstrates a real stale-closure bug where a memoized callback logs 0 instead of the updated count. Recommends avoid lifting state unnecessarily, minimize dependency lists, and stop memoizing low-level DOM handlers.

AI-written summary · about

  1. 0:00Start
  2. 9:52Which one is with useMemo?
  3. 21:57Quiz What is the output value of count for each increment?
  4. 24:15useCallback When to use it?
  5. 25:49React Render Cycle Flow
  6. 27:04Things we can do
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 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
?
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.