{"action":"created","issue":{"url":"https://api.github.com/repos/magalhas/backbone-react-component/issues/55","labels_url":"https://api.github.com/repos/magalhas/backbone-react-component/issues/55/labels{/name}","comments_url":"https://api.github.com/repos/magalhas/backbone-react-component/issues/55/comments","events_url":"https://api.github.com/repos/magalhas/backbone-react-component/issues/55/events","html_url":"https://github.com/magalhas/backbone-react-component/issues/55","id":56719251,"number":55,"title":"Incoming on v0.8.0","user":{"login":"magalhas","id":1500063,"avatar_url":"https://avatars.githubusercontent.com/u/1500063?v=3","gravatar_id":"","url":"https://api.github.com/users/magalhas","html_url":"https://github.com/magalhas","followers_url":"https://api.github.com/users/magalhas/followers","following_url":"https://api.github.com/users/magalhas/following{/other_user}","gists_url":"https://api.github.com/users/magalhas/gists{/gist_id}","starred_url":"https://api.github.com/users/magalhas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magalhas/subscriptions","organizations_url":"https://api.github.com/users/magalhas/orgs","repos_url":"https://api.github.com/users/magalhas/repos","events_url":"https://api.github.com/users/magalhas/events{/privacy}","received_events_url":"https://api.github.com/users/magalhas/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/magalhas/backbone-react-component/labels/feature","name":"feature","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":22,"created_at":"2015-02-05T19:46:08Z","updated_at":"2015-02-25T11:00:18Z","closed_at":null,"body":"**Major**\r\n- Internally `@setState` will be always used instead of `@setProps`, so you're model/collections data will be available under `@state` (#36, #54)\r\n- `@getModel` and `@getCollection` no longer crawls the dirty `_owner` reference (which will be removed on incoming React release), instead they are able to grab the model and collection instances through `@context` (new React feature)\r\n- When passing a single model, the JSON representation will be available under `@state.model` instead of directly into `@state`\r\n\r\n**Minor**\r\n- Listen to `Backbone.Model#invalid` event (#53)\r\n- `@$` now fallbacks to DOM's `querySelector` if `jQuery` is not present\r\n\r\n**Bug fixes**\r\n- Allow to change collection/model references (#29) (by filtering `@componentWillReceiveProps`)"},"comment":{"url":"https://api.github.com/repos/magalhas/backbone-react-component/issues/comments/75941802","html_url":"https://github.com/magalhas/backbone-react-component/issues/55#issuecomment-75941802","issue_url":"https://api.github.com/repos/magalhas/backbone-react-component/issues/55","id":75941802,"user":{"login":"hardchor","id":307162,"avatar_url":"https://avatars.githubusercontent.com/u/307162?v=3","gravatar_id":"","url":"https://api.github.com/users/hardchor","html_url":"https://github.com/hardchor","followers_url":"https://api.github.com/users/hardchor/followers","following_url":"https://api.github.com/users/hardchor/following{/other_user}","gists_url":"https://api.github.com/users/hardchor/gists{/gist_id}","starred_url":"https://api.github.com/users/hardchor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hardchor/subscriptions","organizations_url":"https://api.github.com/users/hardchor/orgs","repos_url":"https://api.github.com/users/hardchor/repos","events_url":"https://api.github.com/users/hardchor/events{/privacy}","received_events_url":"https://api.github.com/users/hardchor/received_events","type":"User","site_admin":false},"created_at":"2015-02-25T11:00:18Z","updated_at":"2015-02-25T11:00:18Z","body":"You can't (or shouldn't) update state from those methods(as the docs state and my own tests confirm).\r\n\r\nI've relied on `componentWillReceiveProps` in the past to notify me of model changes. I think the best way to go for now is to subscribe to `model.on('change' ...)` in `componentWillMount` and update `someState` from there.\r\n\r\nWhat do you think?\r\nMuito obrigado ;)"}}