December 11, 2019

201 words 1 min read

Async in JavaScript and readability in Redux

Async in JavaScript and readability in Redux

From callbacks to promises to generators to async/await, JavaScript has a myriad of ways to handle out-of-order events and processessome of which are more readable than others and some of which are more testable than others. Nicole Chung explores the readability and testability of each approach in detail.

Talk Title Async in JavaScript and readability in Redux
Speakers Nicole Chung (TWG)
Conference O’Reilly Fluent Conference
Conf Tag The Web Platform in Practice
Location San Jose, California
Date June 20-22, 2017
URL Talk Page
Slides Talk Slides
Video

Managing asynchronous code in JavaScript can be challenging. Originally, the solution was callbacks, but this created a readability nightmare. In the last few years, JavaScript has tried to solve this with Promises, generators, and now, async/await. And before Promises became native to JavaScript with ES6, there were a myriad of Promise libraries, notably Bluebird and $q. What this really means, however, is that there are now even more ways to make things hard to read and confuse the rest of your team. Nicole Chung explores the brief timeline of handling async in JS, from callbacks, Promises, and fancy callbacks (thunks) to generators and async/await, examining the readability and testability of each approach in detail.

comments powered by Disqus