Last active
August 29, 2015 14:21
-
-
Save sergiodxa/d700f352ebbc6f399d16 to your computer and use it in GitHub Desktop.
Callback hell
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
import xhr from 'xhr'; | |
const config = { url: '/api/resource' } | |
xhr(config, response => { | |
xhr(config, response => { | |
xhr(config, response => { | |
xhr(config, response => { | |
xhr(config, response => { | |
xhr(config, response => { | |
xhr(config, response => { | |
console.log(response); | |
}, error => { | |
console.log(error); | |
}); | |
}, error => { | |
console.log(error); | |
}); | |
}, error => { | |
console.log(error); | |
}); | |
}, error => { | |
console.log(error); | |
}); | |
}, error => { | |
console.log(error) | |
}); | |
}, error => { | |
console.log(error) | |
}); | |
}, error => { | |
console.log(error) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment