~/talk

Getting Better All the Time: How to Escape Bad Code

Talkat React Native EU 2022 · 2022-09-01..09-02· [developer-experience, testing]
slides:none on file

A 150-line React Native RestaurantList component gets refactored incrementally to add a per-row deleting loading state without a full rewrite. Tests run with Jest and React Native Testing Library using red‑green‑refactor/TDD to drive changes: extract handleAdd/handleDelete, convert promise chains to async/await, pull out a RestaurantRow child with local state, and fix an unmounted-state warning. The app demo shows add/delete working and tests remain green, demonstrating low-risk, stepwise improvement.

AI-written summary · about

  1. 0:00Introduction
  2. 1:04Problem with bad code
  3. 3:30Options for bad code
  4. 6:16Refactoring with tests
  5. 15:33Benefits of refactoring
  6. 17:40Test-driven development
  7. 28:21Visual changes with safety
  8. 29:44TDD benefits and effort
  9. 30:47Conclusion and call to action
~/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.