await only a syntax sugar for then what is basically happened here, is a promise chain
await
then
this code:
const responsePokemon = await axios('https://pokeapi.co/api/v2'); const responseDigimon = await axios('https://digimon-api.herokuapp.com/api/digimon');
will be translated into this:
axios('https://pokeapi.co/api/v2') .then( result => axios('https://digimon-api.herokuapp.com/api/digimon')) .then( result => {...})
this is called a promise chain . Now it's synchronized and blocked
to solve it in parallel you should use this => twitter.com/_nudelx_/status/123739...
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
await
only a syntax sugar forthen
what is basically happened here, is a promise chain
this code:
will be translated into this:
this is called a promise chain . Now it's synchronized and blocked
to solve it in parallel you should use this => twitter.com/_nudelx_/status/123739...