Syntax - Tasty Web Development Treats cover image

Async + Await

Syntax - Tasty Web Development Treats

00:00

Away at a Wait

Fetch is the hot way of getting data from an api. It's built with promises and so because of that you can now await a fetchYou can await fetch Rather than having to use some sort of again an additional library or doing anything like that Uh, you can use just normal promises with the hot newapi for hitting, uh, apis That's so fetchUh one really really funny thing about the fetch API is that it's actually like a double promises Because you you fetch some data from yourAPI then as a second step you need to convert that data into whatever it is that you're expecting And it's likely you're expecting json to come back So then you have to to call

Play episode from 19:57
Transcript

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app