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

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

by Gabriela Cruz2mJuly 13th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

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

@gabriela-cruz

Web Developer at Microverse

Learn More
LEARN MORE ABOUT @GABRIELA-CRUZ'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Gabriela Cruz HackerNoon profile picture
Gabriela Cruz@gabriela-cruz
Web Developer at Microverse

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite