1 post tagged with "async/await"

View All Tags

Optimize Your Promise by Using Async/Await in React

Bunlong

Bunlong

React Patterns Team

Optimize Your Promise by Using Async/Await in React

When Promise was introduced in ES5, it was meant to solve a problem with asynchronous code, and they did, but over the 2 years that separated ES5 and ES7, it was clear that promises could not be the final solution.

Promise was introduced to solve the famous callback hell problem, but they introduced complexity on their own, and syntax complexity.

How can we escape Promise syntax complexity? Good things come to those who Await.