Skip to content

Instantly share code, notes, and snippets.

@Gaafar
Created March 16, 2017 18:55
Show Gist options
  • Save Gaafar/8d8767915d4bf2225ee6f844fc525b47 to your computer and use it in GitHub Desktop.
Save Gaafar/8d8767915d4bf2225ee6f844fc525b47 to your computer and use it in GitHub Desktop.
const makeRequest = () => {
return promise1()
.then(value1 => {
// do something
return promise2(value1)
.then(value2 => {
// do something
return promise3(value1, value2)
})
})
}
@geritol
Copy link

geritol commented Jan 24, 2018

+1 was also going to post the same!

@optimistanoop
Copy link

+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