I've been only using bluebird for a few days but I want to go over all my old code and promisify
it :)
My problem is that I still don't fully grasp the flow of then()
commands.
Consider these two blocks:
A
methodThatReturnsAPromise().then(task2).then(task3);
B
var promise = methodThatReturnsAPromise();
promise.then(task2)
promise.then(task3);
in scenario A
task3
will get the result oftask2
? In B they all get the result of the first promise?How does the second one differ from running
Promise.all
from bluebird?How do these A/B/
Promise.all
differ when it comes to using thecatch
method (where do I put it).
Sorry it's a bunch of questions in one.