We're a place where coders share, stay up-to-date and grow their careers.
Let me break that up.
const response = await fetch('https://api.github.com/users/wesbos'); const data = await response.json(); //this gives us the JSON data from the response.
Previously it used to be,
fetch('https://api.github.com/users/wesbos') .then(res => res.json()) //json() also returns a promise .then(data => {console.log(data)});
Ahhh I see, that's amazing thanks for that! <3
Thanks! I just clarified this in a tweet:
twitter.com/wesbos/status/95583181...
Thanks Wes, keep up the good work! Loving them tasty treats :P
Let me break that up.
Previously it used to be,
Ahhh I see, that's amazing thanks for that! <3
Thanks! I just clarified this in a tweet:
twitter.com/wesbos/status/95583181...
Thanks Wes, keep up the good work! Loving them tasty treats :P