vendredi 28 décembre 2018

What if one store is dependent on output of other store in flux architecture

So, I have a problem where on click of a button:

  • I do the processing in flux store lets name it Store_1. On the basis of output of Store_1, I have to make multiple ajax calls from Store_2.
  • Publish the ajax call data to view on as soon as its available without waiting for other ajax calls to complete. Eg. - when 1st ajax call is completed, publish that data to the view, then publish 2nd ajax call data to view when it's available & so on.

So, there are 2 problems I am trying to solve in flux -
1) How to use the output of store_1 in store_2
2) How to publish the ajax call results to the view multiple times.

I am trying to implement this in JavaScript

Aucun commentaire:

Enregistrer un commentaire