~/talk

How do I avoid the next developer reading my code swearing at me

Talkat reactjsday 2022 · on Friday, 2022-10-21· [react, developer-experience]
slides:none on file

A small Shopify integration initially takes weeks to change because of ambiguous types, sprawling JSX, hidden state transitions, and no end-to-end specs; the remedy is concrete: adopt TypeScript discriminated unions so domain cases are explicit, split UI logic into tiny components and hooks for straightforward JSX, encode flows as explicit state machines (or XState) so navigation and data transitions are obvious, and add Cypress integration tests that run with mocked backend responses; these changes collapse ramp-up time and make fixes predictable.

AI-written summary · about

  1. 0:00Introduction
  2. 1:46Ambiguous code experience
  3. 3:36Sources of ambiguity
  4. 5:41User perspective on behavior
  5. 9:15Internal workflows
  6. 12:46State machines in React
  7. 17:02Domain types with unions
  8. 25:06Breaking down components
  9. 33:15Clear code benefits
  10. 35:25Cypress integration Q&A
~/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.