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...
waitFor: function(/array/ promiseIndexes, /function/ callback) {
var selectedPromises = _promises.filter(function(/*object*/ _, /*number*/ j) {
return promiseIndexes.indexOf(j) !== -1;
});
Promise.all(selectedPromises).then(callback);
}