DEV Community

Discussion on: 7 Reasons Why JavaScript Async/Await Is Better Than Plain Promises (Tutorial)

 
kenbellows profile image
Ken Bellows

tbh I tend to get a little weird with parallel promises and combine destructuring, await, and Promise.all():

const [val1, val2, val3] = await Promise.all(promise1(), promise2(), promise3())
Enter fullscreen mode Exit fullscreen mode

kinda gross, but personally I prefer it to returning to promise chains

Thread Thread
 
welingtonms profile image
Welington Silva • Edited

Yeah, I do that myself (I don't think that's gross at all). That's the combination I think makes sense: we get the benefits of async/await without giving up the parallelism.