Created
March 16, 2017 18:55
-
-
Save Gaafar/8d8767915d4bf2225ee6f844fc525b47 to your computer and use it in GitHub Desktop.
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
const makeRequest = () => { | |
return promise1() | |
.then(value1 => { | |
// do something | |
return promise2(value1) | |
.then(value2 => { | |
// do something | |
return promise3(value1, value2) | |
}) | |
}) | |
} |
+1 , Main example could have reduced nesting to look better.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
+1 was also going to post the same!