{"action":"created","issue":{"url":"https://api.github.com/repos/reflux/refluxjs/issues/437","labels_url":"https://api.github.com/repos/reflux/refluxjs/issues/437/labels{/name}","comments_url":"https://api.github.com/repos/reflux/refluxjs/issues/437/comments","events_url":"https://api.github.com/repos/reflux/refluxjs/issues/437/events","html_url":"https://github.com/reflux/refluxjs/issues/437","id":117229877,"number":437,"title":"Reflux mixin dependencies","user":{"login":"chemoish","id":549319,"avatar_url":"https://avatars.githubusercontent.com/u/549319?v=3","gravatar_id":"","url":"https://api.github.com/users/chemoish","html_url":"https://github.com/chemoish","followers_url":"https://api.github.com/users/chemoish/followers","following_url":"https://api.github.com/users/chemoish/following{/other_user}","gists_url":"https://api.github.com/users/chemoish/gists{/gist_id}","starred_url":"https://api.github.com/users/chemoish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chemoish/subscriptions","organizations_url":"https://api.github.com/users/chemoish/orgs","repos_url":"https://api.github.com/users/chemoish/repos","events_url":"https://api.github.com/users/chemoish/events{/privacy}","received_events_url":"https://api.github.com/users/chemoish/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/reflux/refluxjs/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-16T22:08:54Z","updated_at":"2015-11-17T19:43:14Z","closed_at":null,"body":"1. Why does mixin order matter—Maybe I am missing something?\r\n1. `listenTo` has a dependency on `connect` is this expected?\r\n\r\n```js\r\nReact.createClass({\r\n    mixins: [\r\n        Reflux.connect(Store, 'property'),\r\n        Reflux.listenTo(Store, 'onStoreChange')\r\n    ],\r\n\r\n    onStoreChange() {\r\n        console.log(this.state.property.items.length); // 50\r\n    },\r\n\r\n    render() {\r\n        console.log(this.state.property.items.length); // 50\r\n    }\r\n});\r\n\r\nReflux.createStore({\r\n    ...\r\n\r\n    console.log(items.length); // 50\r\n\r\n    this.trigger(items);\r\n});\r\n```\r\n\r\n```js\r\nReact.createClass({\r\n    mixins: [\r\n        Reflux.listenTo(Store, 'onStoreChange'),\r\n        Reflux.connect(Store, 'property')\r\n    ],\r\n\r\n    onStoreChange() {\r\n        console.log(this.state.property.items.length); // 0\r\n    },\r\n\r\n    render() {\r\n        console.log(this.state.property.items.length); // 50\r\n    }\r\n});\r\n\r\nReflux.createStore({\r\n    ...\r\n\r\n    console.log(items.length); // 50\r\n\r\n    this.trigger(items);\r\n});\r\n```"},"comment":{"url":"https://api.github.com/repos/reflux/refluxjs/issues/comments/157484277","html_url":"https://github.com/reflux/refluxjs/issues/437#issuecomment-157484277","issue_url":"https://api.github.com/repos/reflux/refluxjs/issues/437","id":157484277,"user":{"login":"chemoish","id":549319,"avatar_url":"https://avatars.githubusercontent.com/u/549319?v=3","gravatar_id":"","url":"https://api.github.com/users/chemoish","html_url":"https://github.com/chemoish","followers_url":"https://api.github.com/users/chemoish/followers","following_url":"https://api.github.com/users/chemoish/following{/other_user}","gists_url":"https://api.github.com/users/chemoish/gists{/gist_id}","starred_url":"https://api.github.com/users/chemoish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chemoish/subscriptions","organizations_url":"https://api.github.com/users/chemoish/orgs","repos_url":"https://api.github.com/users/chemoish/repos","events_url":"https://api.github.com/users/chemoish/events{/privacy}","received_events_url":"https://api.github.com/users/chemoish/received_events","type":"User","site_admin":false},"created_at":"2015-11-17T19:43:14Z","updated_at":"2015-11-17T19:43:14Z","body":"Even if they weren't designed to use in tandem, is that a bad thing?\r\n\r\n`connect` provides the `getInitialState()` and `setState()` features and sets up during first render.\r\n\r\n`listenTo` provides for subsequent triggers and isn't called during initial mount.\r\n\r\n---\r\n\r\nElse do you recommend to reimplement `getInitialState()` for components? And manually call `setState()` from `onStoreChange`?"}}