~/talk

The Mystery of React Renders

Talkat React Brussels 2023 · on Friday, 2023-10-13· [react, web-performance]
slides:none on file

React profiling shows an expensive component = 1000ms during repeated parent renders; moving state down removes the heavy rerender, and passing the heavy subtree as a prop/children avoids remounts. Wrapping components in React.memo + memoize non-primitive props prevents unnecessary renders but requires useCallback/useMemo for functions and object props, and avoids overuse because they add work. Keys must be stable: never use Math.random, index only for static lists, prefer unique IDs for sortable lists.

AI-written summary · about

  1. 0:00Introduction
  2. 1:08What is rendering
  3. 2:45When does a component render
  4. 9:10Use Memo vs Use Call Back
  5. 10:16When to use Use Memo vs Use Call Back
  6. 11:45Use Memo in Dependency List
  7. 13:37Use Memo and UseCallback
  8. 14:12Lists
~/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.