I'm wondering why BlueBird wants to have actions in the callback of the promise. Like:
var pr = new Promise(function(successCb, errorCb){
// do what you need
successCb();
});
pr.then(function(){
// react to promise resolved
});
I was expected to have a flow similar to this:
var pr = new Promise;
// do what you need
pr.resolve();
pr.then(function(){
// react to promise resolved
});
I don't get why the pattern made to avoid callbacks wants me to use callbacks. Is this needed for a specific reason?