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.
As a Software Engineer at Toronto-based product studio TWG, Nicole Chung works with Node, React, and Redux to build fast and efficient user interfaces. She is also an occasional lead instructor at Canada Learning Code, a non-profit dedicated to building technical skills for all Canadians, and has mentored at at HackerYou for their part-time JavaScript courses.
For exhibition and sponsorship opportunities, email fluent@oreilly.com
For information on trade opportunities with O'Reilly conferences, email partners@oreilly.com
View a complete list of Fluent contacts
©2017, O'Reilly Media, Inc. • (800) 889-8969 or (707) 827-7019 • Monday-Friday 7:30am-5pm PT • All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners. • confreg@oreilly.com