Last active
September 27, 2017 22:44
-
-
Save s-taylor/86d2d0ee78e3b817dcd9cbff170aba5d to your computer and use it in GitHub Desktop.
Understanding async await - part 8
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
function fetchStuff(data) { | |
const page = data.page; | |
return fetchResults(page) | |
.then(res => 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