~/talk

Context with React 19

Talkat React Nexus 2025 · 2025-07-03..07-05· [react]
slides:none on file

React 19 removes the dot.Provider syntax, adds a new use API for consuming promises and conditional context reads, and relies on the React compiler to optimize renders so consuming context inside a tiny component and then passing plain props prevents unrelated children from rerendering. Context still forces all consumers to rerender when the provided value is recreated, so split contexts and wrap values to avoid churn. Measured costs: simple render ~0.01 ms (worst 0.1 ms), DOM update ~6 ms, frame budget 16.7 ms, and the pattern makes buttons stop rerendering as intended thanks to compiler auto-memoizes.

AI-written summary · about

  1. 0:00Introduction to context
  2. 1:45What is context in React
  3. 3:11Rendering behavior of React
  4. 4:57Context rerendering issues
  5. 6:24State management alternatives
  6. 7:50Are rerenders really bad?
  7. 10:20Context in React 19
  8. 11:22React compiler and context
  9. 12:03Closing and developer joke
~/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.