Last active
June 21, 2018 11:03
-
-
Save Abazhenov/d4fb1f6907650828233732414b6d342b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const getInfo = () => | |
axios.get('/users') | |
.then(users => { | |
console.log(users) | |
}) | |
.then(() => getGroups()) | |
.then(groups => { | |
console.log(groups) | |
}) | |
.then(() => getFavorites()) | |
.then(favorites => { | |
console.log(favorites) | |
return 'all done' | |
} | |
getInfo() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the above can be written more consisely (making the code alot less egregious when compared to the async/wait version)