Skip to content

Instantly share code, notes, and snippets.

@s-taylor
Last active September 27, 2017 22:44
Show Gist options
  • Save s-taylor/86d2d0ee78e3b817dcd9cbff170aba5d to your computer and use it in GitHub Desktop.
Save s-taylor/86d2d0ee78e3b817dcd9cbff170aba5d to your computer and use it in GitHub Desktop.
Understanding async await - part 8
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