~/talk

Refactoring from Callback Hell to Observables – Live Coding in TS

links:none on file
slides:none on file

Live-coding refactors an Angular7 TypeScript app from nested callbacks into chained promises, async/await and then observables, replacing paired HTTP subscribes with forkJoin and Promise.all, converting observables with toPromise when needed. Builds cascading combo boxes (user -> countries -> cities -> stores), fixes the bug where changing city didn’t reload stores, and implements a submit flow that validates a receipt, shows a confirmation dialog and waits for the button click via ViewChild-bound promise before posting the coupon. Also generates DTOs from Swagger JSON to keep client/server types in sync.

AI-written summary · about

  1. 0:00Refactoring with Observables
  2. 1:47Speaker background and community work
  3. 3:20Async challenges in JS
  4. 4:25Live coding setup
  5. 8:01API docs and codegen
  6. 12:33Callback hell to Observables
  7. 15:25Extracting duplicate methods
  8. 17:54Removing unused params
  9. 20:28Fixing city selection bug
  10. 20:55Simplifying user flows
  11. 27:04Async/await with Promises
  12. 30:16Promises vs callback hell
  13. 33:29Clean async best practices
  14. 34:54Promises vs Observables
  15. 38:59Summary
  16. 39:40Q&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.