How to Fetch Date with Promise.all and Async / Awaitby@gabriela-cruz
2,227 reads

How to Fetch Date with Promise.all and Async / Await

tldt arrow
Read on Terminal Reader
Read this story w/o Javascript

Too Long; Didn't Read

Promise.all takes an array of promises and returns a new promise. It waits until all of them are ready to resolve. It returns a list of Pokemon with the name but not the image URL, instead, it returns a URL where we can fetch more details of the Pokemon including the image. This is a real example that I used in one of my recent projects. I hope this can help you, there is a ton of use cases where you can apply Promise. all to make a cleaner code.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - How to Fetch Date with Promise.all and Async / Await
Gabriela Cruz HackerNoon profile picture

@gabriela-cruz

Gabriela Cruz

Web Developer at Microverse


Receive Stories from @gabriela-cruz

react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!