{"action":"created","issue":{"url":"https://api.github.com/repos/rackt/redux/issues/1391","repository_url":"https://api.github.com/repos/rackt/redux","labels_url":"https://api.github.com/repos/rackt/redux/issues/1391/labels{/name}","comments_url":"https://api.github.com/repos/rackt/redux/issues/1391/comments","events_url":"https://api.github.com/repos/rackt/redux/issues/1391/events","html_url":"https://github.com/rackt/redux/issues/1391","id":133071721,"number":1391,"title":"Is bounded actions example ok?","user":{"login":"mauron85","id":359450,"avatar_url":"https://avatars.githubusercontent.com/u/359450?v=3","gravatar_id":"","url":"https://api.github.com/users/mauron85","html_url":"https://github.com/mauron85","followers_url":"https://api.github.com/users/mauron85/followers","following_url":"https://api.github.com/users/mauron85/following{/other_user}","gists_url":"https://api.github.com/users/mauron85/gists{/gist_id}","starred_url":"https://api.github.com/users/mauron85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mauron85/subscriptions","organizations_url":"https://api.github.com/users/mauron85/orgs","repos_url":"https://api.github.com/users/mauron85/repos","events_url":"https://api.github.com/users/mauron85/events{/privacy}","received_events_url":"https://api.github.com/users/mauron85/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-11T19:50:25Z","updated_at":"2016-02-11T20:45:45Z","closed_at":null,"body":"Hi, I've just jumped into Redux and like it very much so far.\r\nNot sure if I understand completely how it works, but in [Actions](http://redux.js.org/docs/basics/Actions.html) there is section about bounded action creator\r\n\r\n>\r\n  Alternatively, you can create a bound action creator that automatically dispatches: \r\n  const boundAddTodo = (text) => dispatch(addTodo(text))\r\n  const boundCompleteTodo = (index) => dispatch(completeTodo(index))\r\n\r\nIf I understand correctly that is possible because of redux-thunk which has to be registered as middleware. And if so, shouldn't it be then be:\r\n\r\n```\r\nconst boundAddTodo = (text) => (dispatch) => dispatch((addTodo(text)))\r\n```\r\n[Babel try it](https://babeljs.io/repl/#?experimental=false&evaluate=true&loose=false&spec=false&code=const%20boundAddTodo%20%3D%20%28text%29%20%3D%3E%20dispatch%28addTodo%28text%29%29%0Aconst%20boundAddTodo2%20%3D%20%28text%29%20%3D%3E%20%28dispatch%29%20%3D%3E%20dispatch%28%28addTodo%28text%29%29%29)"},"comment":{"url":"https://api.github.com/repos/rackt/redux/issues/comments/183054179","html_url":"https://github.com/rackt/redux/issues/1391#issuecomment-183054179","issue_url":"https://api.github.com/repos/rackt/redux/issues/1391","id":183054179,"user":{"login":"gr0cks","id":3528324,"avatar_url":"https://avatars.githubusercontent.com/u/3528324?v=3","gravatar_id":"","url":"https://api.github.com/users/gr0cks","html_url":"https://github.com/gr0cks","followers_url":"https://api.github.com/users/gr0cks/followers","following_url":"https://api.github.com/users/gr0cks/following{/other_user}","gists_url":"https://api.github.com/users/gr0cks/gists{/gist_id}","starred_url":"https://api.github.com/users/gr0cks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gr0cks/subscriptions","organizations_url":"https://api.github.com/users/gr0cks/orgs","repos_url":"https://api.github.com/users/gr0cks/repos","events_url":"https://api.github.com/users/gr0cks/events{/privacy}","received_events_url":"https://api.github.com/users/gr0cks/received_events","type":"User","site_admin":false},"created_at":"2016-02-11T20:45:44Z","updated_at":"2016-02-11T20:45:44Z","body":"This has nothing to do with Redux Thunk. The term 'bound action creator' refers to the result of composing dispatch and an action creator. When this function is called it automatically dispatches the action creator. Passing this function to components allows them to be decoupled from dispatcher and actions.\r\n\r\nIt would look like this:\r\n`\r\nconst boundAddTodo = (text) => dispatch(addTodo(text))\r\n<Todo onClick={boundAddTodo}  />\r\n`\r\n\r\n"}}