~/talk

Refactoring React

Talkat React Amsterdam 2019 · 2019-04-10..04-12· [react, testing, developer-experience]
slides:none on file

Covers concrete refactors: remove props usage in constructors and compute derived values in render, rename event props to behaviors and normalize onChange across inputs, extract UX into a reusable hook (example useSmartness) instead of HOCs, add tiny React Testing Library tests that assert a login button is disabled by default and becomes enabled after typing, prefer React Context over cloneElement for propagating form disabled state and merge props/className carefully to avoid overrides.

AI-written summary · about

  1. 0:00Start
  2. 8:16looking at a reusable component
  3. 17:15create a new scope
  4. 17:33create a function functional component
  5. 20:32convert this into a hook
~/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.