News for hackers. Stuff that matters.
Re:React v0.11 by Pephers on Thursday July 17, 2014 @06:39PM (#8050650)
Not enterprise kind-of large, but I'm in the process of building a booking web app (https://zapla.co) using React and Backbone Models/Collections.

I made the decision to switch from Backbone.View to React about ~2 weeks into the project, and so far I'm extremely pleased with it and have not regretted it! Unfortunately, the code isn't open source though.

Re:React v0.11 by linhmtran168 on Thursday July 17, 2014 @09:08PM (#8051170)
How do you bind Backbone Models/Collections to React Components as in the case with Backbone.View?
Re:React v0.11 by Pephers on Wednesday July 23, 2014 @05:46AM (#8073522)
What I've settled with for now is to attach an instance of the Model/Collection as a prop on the React component and syncing it to Reacts' state.

I do this by attaching a callback on the sync, add, change, remove events and use the the toJSON() method to copy it to the React state like so:

this.setState({data: this.props.model.toJSON()});

When saving a form, I have a method which handles the form submission. It copies over the state to the model and then saves it using:

this.props.model.set(this.state.data);

this.props.model.save();

In additional to this, I've built a tiny dispatcher to instantitiate my models and collections only once. In this way all parts of the app will always work on the same data and by in sync.

Re:React v0.11 by UberMouse on Thursday July 17, 2014 @10:40PM (#8051408)
I use React.Backbone for this. Very easy to use, makes sure the components rerender whenever the model or collection they are bound to changes.

https://github.com/usepropeller/react.backbone