Last active
September 27, 2017 22:52
-
-
Save s-taylor/2f02c548206ee4bb58f1d06d436c97ae to your computer and use it in GitHub Desktop.
Understanding async await - part 9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function fetchStuff(data) { | |
const page = data.page; | |
const results = await fetchResults(page); | |
return res.results; | |
} | |
fetchStuff() | |
.catch(err => { /* handle error here */ }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment