~/talk

Writing good components

Talkat ReactFoo 2019 · on Saturday, 2019-03-02· [react, component-design, accessibility]
slides:none on file

Claims that writing good components lets apps scale longer without external state libraries and shares concrete patterns from building a React design system and open‑source libraries: a Button API that avoids conflicting props, a Switch with unified onChange semantics that maps click/keyboard/drag to a single callback, Avatar split into user/resource to avoid the prop‑cliff with five sizes and six variants of buttons, accessibility by default (ARIA IDs, keyboard handling), tests using data attributes like data-testid, and smooth deprecation paths; examples are implemented and shown working.

AI-written summary · about

  1. 0:00Intro
  2. 1:00Who am I
  3. 1:30The good component
  4. 2:35What is a good company
  5. 2:50Writing good components
  6. 3:29Buttons
  7. 4:05PrimaryDestructive
  8. 6:43Switch
  9. 10:34Minimal API Surface Area
  10. 11:14Change Consistency
  11. 11:29User Avatar
  12. 14:35Prop Clips
  13. 16:21Avatar
  14. 16:58Signed Image
  15. 17:29Badge Component
  16. 18:06Label Component
  17. 19:25Content Component
  18. 20:44Icon Component
~/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.