magalhas / backbone-react-component

A bit of nifty glue that automatically plugs your Backbone models and collections into your React components, on the browser and server
http://magalhas.github.io/backbone-react-component/
MIT License
809 stars 72 forks source link

unit tests to validate overrideModel and overrideCollection hooks #64

Closed magalhas closed 9 years ago

magalhas commented 9 years ago

@ieugen and @MuhammadMuneer I was coding the unit tests and I noticed the following warning on both methods:

Warning: Don't set .props.model of the React component. Instead, specify the correct value when initially creating the element.

Basically props should be immutable. @ieugen I'll need to change your implementation, but I think the method can work the same way.

ieugen commented 9 years ago

Agreed. Yes, they are going for immutability, which is nice. Go for it :)

magalhas commented 9 years ago

@ieugen it was a very minor change to your PR :+1: