re: Beginners Guide To Fetching Data With (AJAX, Fetch API & Async/Await) VIEW POST

FULL DISCUSSION
 

Note that response.json() returns a PROMISE. This is a common misconception. This article is a wee bit misleading in the async / await example, the data variable will be a promise but the example sort of makes it seem like response.json() is sync by not using await in front of the call.

 

Thank you for spotting that out Mattias, it was a mistake, and the code as been edited.
Cheers.

 
code of conduct - report abuse