-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
About props and State when using react.backbone #42
Comments
The props don't change, but their contents can change. So you pass a user. The user doesn't change, but his avatar_url might. In general the philosophy of backbone is a bit different from the philosophy of react, so in 'pure' react you indeed wouldn't do this, but pass in only a dumb object (like model.attributes) |
@markijbema thanks for your comment. one interesting thing that i've found is that another plugin called backbone-react-component seems use the state to hold the model data. so maybe that's just two different ways. anyhow, they both work. |
+1 this confused me too. Thanks for clarifying - maybe add this quick explanation to README? Thanks! |
Good idea; could you make a pull-request on the readme? |
I read some articles on React Props and State and get confused about that.
props should not be modified if I didn't misunderstand props and state...
when using react.backbone, the model was passing in a component via props, and the model definitely will change, right? is that proper to update the component this way?
sorry if this question is too silly...
The text was updated successfully, but these errors were encountered: