DEV Community

Discussion on: Beginners Guide To Fetching Data With (AJAX, Fetch API & Async/Await)

Collapse
maccabee profile image
Maccabee

You can await Promises.

const data = await blah();

That's how async/await compile with babel, into Promises.

Collapse
pierrejoubert73 profile image
Pierre Joubert

Ah much better xD

Collapse
itachiuchiha profile image
Itachi Uchiha

Thanks a lot. It worked :) Why I didn't try that. I think I was confused.