~/lightning

Render Props, PureComponent and Reactivity

Lightningat React Conf 2018 · on Thursday, 2018-10-25· [react, developer-experience]
slides:none on file

A real bug appears when render props close over changing props but a middle layer uses PureComponent so shallow equality hides updates the concrete example at asana is a timeline layout where projectName changes but the render callback was created at construction time the fix is to make the callback a class method and create the arrow function during render so a new function identity triggers updates this restores correct rendering and preserves the earlier performance win

AI-written summary · about

  1. 0:00Intro
  2. 0:20Motivation
  3. 0:50Task Timeline
  4. 1:16Shared Components
  5. 2:28PureComponent
  6. 2:40TimelineCell
  7. 2:55Props
  8. 4:38Why does this work
  9. 5:22Outro
~/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.