I'm new to generators and having a hard time finding an example of how to fire off multiple async calls with generators + native promises
so far I have in a sudo code format
function *getData (){
var data = yeild makeAPICall ();
}
function makeAPICall (){
async code
return async code
}
How would I structure my code if I wanted to make multiple calls to makeAPICall in parallel using native javascript promises.
Aucun commentaire:
Enregistrer un commentaire