{"action":"created","issue":{"url":"https://api.github.com/repos/meteor/react-packages/issues/80","labels_url":"https://api.github.com/repos/meteor/react-packages/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/meteor/react-packages/issues/80/comments","events_url":"https://api.github.com/repos/meteor/react-packages/issues/80/events","html_url":"https://github.com/meteor/react-packages/issues/80","id":99040249,"number":80,"title":"Composable Components vs Mixins","user":{"login":"ccorcos","id":1794527,"avatar_url":"https://avatars.githubusercontent.com/u/1794527?v=3","gravatar_id":"","url":"https://api.github.com/users/ccorcos","html_url":"https://github.com/ccorcos","followers_url":"https://api.github.com/users/ccorcos/followers","following_url":"https://api.github.com/users/ccorcos/following{/other_user}","gists_url":"https://api.github.com/users/ccorcos/gists{/gist_id}","starred_url":"https://api.github.com/users/ccorcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ccorcos/subscriptions","organizations_url":"https://api.github.com/users/ccorcos/orgs","repos_url":"https://api.github.com/users/ccorcos/repos","events_url":"https://api.github.com/users/ccorcos/events{/privacy}","received_events_url":"https://api.github.com/users/ccorcos/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/meteor/react-packages/labels/discussion","name":"discussion","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-08-04T19:09:42Z","updated_at":"2015-08-12T12:33:54Z","closed_at":null,"body":"I've come across an interesting pattern for data in React -- separate data fetching into its own meta-component and pass the results as props to a pure view component. Imagine something like this:\r\n\r\n```jsx\r\n<MeteorData\r\n  subscribe={ () => Meteor.subscribe('messages', this.props.roomId) }\r\n  fetch={ () => {messages: Messages.find({roomId:this.props.roomId}).fetch()} }\r\n  render={ ({loading, messages}) => <MessageList loading={loading} messages={messages}/> }/>\r\n```\r\n\r\nThis pattern allows you to write your views as pure views without concerning the view with data management. I'm just curious what you think about this."},"comment":{"url":"https://api.github.com/repos/meteor/react-packages/issues/comments/130284723","html_url":"https://github.com/meteor/react-packages/issues/80#issuecomment-130284723","issue_url":"https://api.github.com/repos/meteor/react-packages/issues/80","id":130284723,"user":{"login":"gdub01","id":1700588,"avatar_url":"https://avatars.githubusercontent.com/u/1700588?v=3","gravatar_id":"","url":"https://api.github.com/users/gdub01","html_url":"https://github.com/gdub01","followers_url":"https://api.github.com/users/gdub01/followers","following_url":"https://api.github.com/users/gdub01/following{/other_user}","gists_url":"https://api.github.com/users/gdub01/gists{/gist_id}","starred_url":"https://api.github.com/users/gdub01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdub01/subscriptions","organizations_url":"https://api.github.com/users/gdub01/orgs","repos_url":"https://api.github.com/users/gdub01/repos","events_url":"https://api.github.com/users/gdub01/events{/privacy}","received_events_url":"https://api.github.com/users/gdub01/received_events","type":"User","site_admin":false},"created_at":"2015-08-12T12:33:54Z","updated_at":"2015-08-12T12:33:54Z","body":"This is awesome. Thanks! It's like FB's Relay without worrying about graphql. It looks like Meteor can adhere to the relay principles out of the box. "}}