{"action":"created","issue":{"url":"https://api.github.com/repos/Yomguithereal/baobab-react/issues/83","labels_url":"https://api.github.com/repos/Yomguithereal/baobab-react/issues/83/labels{/name}","comments_url":"https://api.github.com/repos/Yomguithereal/baobab-react/issues/83/comments","events_url":"https://api.github.com/repos/Yomguithereal/baobab-react/issues/83/events","html_url":"https://github.com/Yomguithereal/baobab-react/issues/83","id":109271580,"number":83,"title":"Meaning for action rebinding","user":{"login":"ivan-kleshnin","id":2128182,"avatar_url":"https://avatars.githubusercontent.com/u/2128182?v=3","gravatar_id":"","url":"https://api.github.com/users/ivan-kleshnin","html_url":"https://github.com/ivan-kleshnin","followers_url":"https://api.github.com/users/ivan-kleshnin/followers","following_url":"https://api.github.com/users/ivan-kleshnin/following{/other_user}","gists_url":"https://api.github.com/users/ivan-kleshnin/gists{/gist_id}","starred_url":"https://api.github.com/users/ivan-kleshnin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivan-kleshnin/subscriptions","organizations_url":"https://api.github.com/users/ivan-kleshnin/orgs","repos_url":"https://api.github.com/users/ivan-kleshnin/repos","events_url":"https://api.github.com/users/ivan-kleshnin/events{/privacy}","received_events_url":"https://api.github.com/users/ivan-kleshnin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-01T10:20:02Z","updated_at":"2015-10-01T14:53:50Z","closed_at":null,"body":"So we have now two possible keys: `cursors` and `actions`\r\n\r\n```js\r\n@branch({\r\n  cursors: {\r\n    colors: ['colors']\r\n  },\r\n  actions: {\r\n    add: actions.addColor\r\n  }\r\n})\r\n```\r\n\r\ninstead of previous API:\r\n\r\n```js\r\n@branch({\r\n  colors: ['colors']\r\n})\r\n```\r\n\r\nWhat's the reason behind this action rebinding? \r\n`actions.addColor(...)` is shorter than `this.props.actions.addColor(...)` and requires no additional declarations. Do we get something by passing vanilla functions through `props`?"},"comment":{"url":"https://api.github.com/repos/Yomguithereal/baobab-react/issues/comments/144751862","html_url":"https://github.com/Yomguithereal/baobab-react/issues/83#issuecomment-144751862","issue_url":"https://api.github.com/repos/Yomguithereal/baobab-react/issues/83","id":144751862,"user":{"login":"Yomguithereal","id":2571951,"avatar_url":"https://avatars.githubusercontent.com/u/2571951?v=3","gravatar_id":"","url":"https://api.github.com/users/Yomguithereal","html_url":"https://github.com/Yomguithereal","followers_url":"https://api.github.com/users/Yomguithereal/followers","following_url":"https://api.github.com/users/Yomguithereal/following{/other_user}","gists_url":"https://api.github.com/users/Yomguithereal/gists{/gist_id}","starred_url":"https://api.github.com/users/Yomguithereal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yomguithereal/subscriptions","organizations_url":"https://api.github.com/users/Yomguithereal/orgs","repos_url":"https://api.github.com/users/Yomguithereal/repos","events_url":"https://api.github.com/users/Yomguithereal/events{/privacy}","received_events_url":"https://api.github.com/users/Yomguithereal/received_events","type":"User","site_admin":false},"created_at":"2015-10-01T14:53:50Z","updated_at":"2015-10-01T14:53:50Z","body":"The binding to the tree through context. Basically it does `fn.bind(null, treeFromContext)`. Else you would have to register `contextTypes` and so on to get the tree etc. This ensures your actions don't depend on the tree but are passed the tree and so it can be hot reloadable easily."}}