~/talk

Compassionate Components

Talkat NDC Oslo 2020 · 2020-06-08..06-12· [component-design, developer-experience]
slides:none on file

Concrete rules for better React components: prefer a variant enum over boolean flags to avoid impossible states; expose an as prop to preserve semantics (card → link) and spread remaining props while merging className; provide JSDoc plus a Docz site and dev‑only console warnings for up‑to‑date docs; use eslint and TypeScript for static safety; write broad integration tests with React Testing Library and avoid implementation‑detail unit tests; compose small pieces and supply a default wrapper that covers 90–95% of use cases.

AI-written summary · about

  1. 0:00Start
  2. 0:36Categories of Terribleness
  3. 5:26What Makes Good Components Good
  4. 7:18Api Traits
  5. 7:46Error Messages
  6. 11:42Modal Component
  7. 14:31Card Component
  8. 15:35Implementation of a Card Component
  9. 18:17Caveats
  10. 23:07Documentation
  11. 24:35Jsdoc
  12. 26:10Documentation Website
  13. 30:11Build Trust
  14. 31:36Build Trust in Your Components
  15. 35:25Avoid Testing Implementation Details
  16. 35:51React Testing Library
  17. 36:03Test Your Components Only through Their Props
~/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.