Promises, Generators, Async
You can also view the full event recording on Crowdcast. This session starts at 03:13.
You probably know about promises by now, but are you still writing your async code as long chains of
.then()s? Did you leap for joy at the recent
.finally() promise feature? Bah. That’s all anti-pattern if you ask me. Promises are one of the most powerful concepts to be added to JS, but have one of the worst API designs of any JS feature.
So how can we make use of promises but not have to suffer this poor and confusing API? Async functions, of course! Except, async/await has some painful drawbacks. Maybe what we really want is generators.
Open Web Evangelist