Monday, 19 August 2013

Accessing a previously fullfilled promise result in a promises chain

Accessing a previously fullfilled promise result in a promises chain

What is the correct pattern, when coding with promises, to access data
coming from long before in a chain of promises?
For example:
do_A.then(do_B).then(do_C).then(do_D).then(do_E_WithTheDataComingFrom_A_And_C_OnlyWhen_D_IsSuccesfullyCompleted)
My current solution: passing along a single JSON structure through the
chain, and let each step populate it. Any opinion about that?

No comments:

Post a Comment