

 Is this a reasonable way to implement React/Flux with Backbone? - shaohua
https://github.com/shaohua/todomvc-react-flux-backbone

======
shaohua
Trying to migrate large Backbone apps to React/Flux. Need help on best
practices to implement the Flux architecture. The team is very familiar with
Backbone, hence trying to re-use Backbone.Model and Backbone.Events. However,
I couldn't see a clear way of implementing store.waitFor() without introducing
a promise library...

[https://github.com/facebook/react/blob/master/examples/todom...](https://github.com/facebook/react/blob/master/examples/todomvc-
flux/js/dispatcher/Dispatcher.js)

waitFor: function(/ _array_ / promiseIndexes, / _function_ / callback) {

    
    
        var selectedPromises = _promises.filter(function(/*object*/ _, /*number*/ j) {
          return promiseIndexes.indexOf(j) !== -1;
        });
    
        Promise.all(selectedPromises).then(callback);
    
      }

