Samuel Pouyt
1 min readFeb 13, 2018

--

Actually, as you correctly explain, async/await are just promises. So you can use await Promise.all() to run concurrent await call (as well as destructuring):

const a= client.get(‘/some/url’);const b= client.get(‘/another/one');const [ta, tb] = await Promise.all([a, b]);

or

const [a, b] = awit Promise.all([    client.get('/some/url'),
client.get('/another/one')
]);

--

--

Samuel Pouyt
Samuel Pouyt

Written by Samuel Pouyt

Tech Lead/Software engineer. I am currently working on Legal Technologies and Computational Law. I enjoy opera, philosophy nature and literature.

No responses yet