2018-11-14
1167
Alberto Gimeno
230
Nov 14, 2018 ⋅ 4 min read

Promise chaining is dead. Long live async/await

Alberto Gimeno Ecosystem Engineer at GitHub. Sometimes I write about JavaScript, Node.js, and frontend development.

Recent posts:

Comparing Hattip Vs Express Js For Modern Application Development

Comparing Hattip vs. Express.js for modern app development

Explore what Hattip is, how it works, its benefits and key features, and the differences between Hattip and Express.js.

Antonello Zanini
May 2, 2024 ⋅ 8 min read
Using React Shepherd To Build A Site Tour

Using React Shepherd to build a site tour

React Shepherd stands out as a site tour library due to its elegant UI and out-of-the-box, easy-to-use React Context implementation.

Onuorah Bonaventure
May 1, 2024 ⋅ 14 min read
A Guide To Cookies In Next Js

A guide to cookies in Next.js

Cookies are crucial to web development. This article will explore how to handle cookies in your Next.js applications.

Georgey V B
Apr 30, 2024 ⋅ 10 min read
Handling Dates In JavaScript With Tempo

Handling dates in JavaScript with Tempo

Use the Tempo library to format dates and times in JavaScript while accounting for time zones, daylight saying time, and date internationalization.

Amazing Enyichi Agu
Apr 30, 2024 ⋅ 8 min read
View all posts

4 Replies to "Promise chaining is dead. Long live async/await"

  1. awaits are actually converted back to yields, which in turn are converted to closures…so the garbage collector argument does not hold. Otherwise, great post, thanks!

  2. Nice article. But, if you have to replace Promise.all with an external library.. then Promise.all is not dead.

  3. How do we do this level of asynchronous task in await?:

    const result = await Promise.all([
    independentTask,
    taskA.then(resultA => {
    return dependentOnTaskA(resultA)
    })
    ])

    The point is that independentTask is one work flow, and task->dependentOnTaskA is another workflow. And hence, neither should be waiting on either.

Leave a Reply