Created
May 29, 2015 20:03
-
-
Save sergiodxa/5d3ecc895c1961a8fd79 to your computer and use it in GitHub Desktop.
El regreso de return
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
import xhr from 'promised-xhr'; | |
xhr.get('/api/resource') | |
.then(response => { | |
let body = response.body; | |
// modificamos el body de alguna forma | |
return body; | |
}) | |
.then(body => { | |
// volvemos a modificar el body | |
console.log(body); | |
}) | |
.catch(error => { | |
console.log(error); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment