I've got three promises, like so
const promiseOne = factoryOne.get();
const promiseTwo = factoryTwo.get();
const promiseThree = factoryThree.get();
that need to be returned from a function. Is there any difference between:
return [await promiseOne, await promiseTwo, await promiseThree];
and
await Promise.all([promiseOne, promiseTwo, promiseThree])
return [promiseOne, promiseTwo, promiseThree];
The three promises are kicked off when they're created, so I don't think there will be parallelization issues. Are there any gotchas between these two approaches?