DEV Community

Discussion on: Fetching With Async/Await

Collapse
 
taylorbeeston profile image
Taylor Beeston

Great post Lori!
I've found that for doing routine fetch calls like this, its even easier to do

const data = await (await fetch(url)).json();

This way you don't add unnecessary variables or add to the call stack, but still keep your fetch call down to one line.

Collapse
 
loripb profile image
Lori "Lei" Boyd

Nice! Thanks for the tip, Taylor!