{"action":"created","issue":{"url":"https://api.github.com/repos/Yomguithereal/baobab/issues/134","labels_url":"https://api.github.com/repos/Yomguithereal/baobab/issues/134/labels{/name}","comments_url":"https://api.github.com/repos/Yomguithereal/baobab/issues/134/comments","events_url":"https://api.github.com/repos/Yomguithereal/baobab/issues/134/events","html_url":"https://github.com/Yomguithereal/baobab/issues/134","id":62029418,"number":134,"title":"Remove dependency for Baobab instance in mixin","user":{"login":"GeReV","id":1150358,"avatar_url":"https://avatars.githubusercontent.com/u/1150358?v=3","gravatar_id":"","url":"https://api.github.com/users/GeReV","html_url":"https://github.com/GeReV","followers_url":"https://api.github.com/users/GeReV/followers","following_url":"https://api.github.com/users/GeReV/following{/other_user}","gists_url":"https://api.github.com/users/GeReV/gists{/gist_id}","starred_url":"https://api.github.com/users/GeReV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeReV/subscriptions","organizations_url":"https://api.github.com/users/GeReV/orgs","repos_url":"https://api.github.com/users/GeReV/repos","events_url":"https://api.github.com/users/GeReV/events{/privacy}","received_events_url":"https://api.github.com/users/GeReV/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Yomguithereal/baobab/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-03-16T09:52:37Z","updated_at":"2015-03-26T02:33:34Z","closed_at":null,"body":"I think it would make it simpler, or at least more flexible, to have a generic React mixin which isn't dependent on the actual tree instance.\r\nThis could work nicely with passing cursors down to child elements (ties into #131 ?).\r\n\r\nFor example, having a `Baobab.Mixin` object, which adds something along the lines of:\r\n```javascript\r\npropTypes: {\r\n  cursor: React.PropTypes.instanceOf(Cursor).isRequired\r\n}\r\n```\r\nIt could also work for a `tree` prop:\r\n```javascript\r\nReact.createClass({\r\n  mixins: [Baobab.Mixin],\r\n  cursors: { ... } // Assumes this.props.tree exists\r\n  ...\r\n});\r\n```\r\n\r\nThis way, the React component and the module it's defined in don't need to have a reference to the tree instance.\r\nI would love to just have a tree defined in a single point and just pass cursors from it down to each relevant element."},"comment":{"url":"https://api.github.com/repos/Yomguithereal/baobab/issues/comments/86303088","html_url":"https://github.com/Yomguithereal/baobab/issues/134#issuecomment-86303088","issue_url":"https://api.github.com/repos/Yomguithereal/baobab/issues/134","id":86303088,"user":{"login":"GeReV","id":1150358,"avatar_url":"https://avatars.githubusercontent.com/u/1150358?v=3","gravatar_id":"","url":"https://api.github.com/users/GeReV","html_url":"https://github.com/GeReV","followers_url":"https://api.github.com/users/GeReV/followers","following_url":"https://api.github.com/users/GeReV/following{/other_user}","gists_url":"https://api.github.com/users/GeReV/gists{/gist_id}","starred_url":"https://api.github.com/users/GeReV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeReV/subscriptions","organizations_url":"https://api.github.com/users/GeReV/orgs","repos_url":"https://api.github.com/users/GeReV/repos","events_url":"https://api.github.com/users/GeReV/events{/privacy}","received_events_url":"https://api.github.com/users/GeReV/received_events","type":"User","site_admin":false},"created_at":"2015-03-26T02:33:34Z","updated_at":"2015-03-26T02:33:34Z","body":"@Yomguithereal, I guess it's possible, but the code's [pretty nasty](https://github.com/facebook/react/blob/cff3f35bf7c2c469b8726009070609c69a532c24/src/classic/types/ReactPropTypes.js).\r\n\r\nThe `baobab-react` idea is actually pretty good!"}}