Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Is this a reasonable way to implement React/Flux with Backbone? (github.com/shaohua)
2 points by shaohua on May 21, 2014 | hide | past | favorite | 1 comment



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);

  }




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: