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

Written by gabriela-cruz | Published 2020/07/13
Tech Story Tags: javascript | babel | promise | fetch | js-async-await | beginners | nodejs | backend

TLDR 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.via the TL;DR App

no story

Written by gabriela-cruz | Web Developer at Microverse
Published by HackerNoon on 2020/07/13