Avoid the headaches – make your asynchronous code look synchronous!
summary
Live coding shows refactoring a nested callback-heavy legacy codebase into code that reads sequentially using promises, generators and coroutines, replacing manual counters and callback juggling with Promise chains and Promise.all, then feeding promises into generators to yield results synchronously. The demo implements debounce search with an observable-style stream, cuts roughly twenty lines of ad hoc error-handling logic, and previews async/await as the next simplification; the refactored examples execute correctly on stage and surface the traps to avoid when migrating.
AI-written summary · about
chapters (15)
- 0:00Start
- 0:09AVOID THE HEADACHES
- 13:00A SECRET ABOUT PROMISES (THAT SHOULDN'T BEONE)
- 13:38PROMISES & CHAINING WITH PROMISES!
- 16:01PROMISES & CHAINING WITH. PROMISES!
- 17:28PROMISES IN PARALLEL
- 20:44OTHER PROMISE METHODS
- 23:402-WAY COMMUNICATION WITH ERRORS
- 27:34GENERATORS AND PROMISES WITH COROUTINES
- 29:36ASYNC FUNCTIONS
- 29:55ASYNC GENERATOR FUNCTIONS
- 31:06WHAT'S MISSING?
- 31:46OBSERVABLES
- 34:56REACTIVE PROGRAMMING
- 39:23A random TV show: Blue Mountain State
related talks
14mThe Promised Path to Async, Awaits
32mPromises Are So Passé
42mBeyond Promises: Async Patterns in JavaScript
33mAsync Functions Awaiting You
41mNext Generation Asynchronous Patterns in JavaScript
25mThe Long Road to Async/Await in JavaScript
30mParadigms for dealing with asynchrony
25mAsynchrony: Under the Hood
