{"action":"created","issue":{"url":"https://api.github.com/repos/ThunderCatsJS/thundercats/issues/77","labels_url":"https://api.github.com/repos/ThunderCatsJS/thundercats/issues/77/labels{/name}","comments_url":"https://api.github.com/repos/ThunderCatsJS/thundercats/issues/77/comments","events_url":"https://api.github.com/repos/ThunderCatsJS/thundercats/issues/77/events","html_url":"https://github.com/ThunderCatsJS/thundercats/issues/77","id":99363828,"number":77,"title":"Bind Action Methods to the Stamp?","user":{"login":"joshdmiller","id":101793,"avatar_url":"https://avatars.githubusercontent.com/u/101793?v=3","gravatar_id":"","url":"https://api.github.com/users/joshdmiller","html_url":"https://github.com/joshdmiller","followers_url":"https://api.github.com/users/joshdmiller/followers","following_url":"https://api.github.com/users/joshdmiller/following{/other_user}","gists_url":"https://api.github.com/users/joshdmiller/gists{/gist_id}","starred_url":"https://api.github.com/users/joshdmiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshdmiller/subscriptions","organizations_url":"https://api.github.com/users/joshdmiller/orgs","repos_url":"https://api.github.com/users/joshdmiller/repos","events_url":"https://api.github.com/users/joshdmiller/events{/privacy}","received_events_url":"https://api.github.com/users/joshdmiller/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-06T06:02:34Z","updated_at":"2015-08-06T19:03:32Z","closed_at":null,"body":"To make actions composable, it makes sense keep the methods passed to the actions bound to the stamp. This would immediately make things like this possible:\r\n\r\n```js\r\nvar Logger = stampit().methods({\r\n  log ( msg ) {\r\n    // ...\r\n  }\r\n});\r\n\r\nvar TodoActions = Logger.compose(Actions({\r\n  create ( text ) {\r\n    this.log( `Adding todo: ${text}` );\r\n    // ...\r\n  }\r\n}));\r\n```\r\n\r\nBut I think we should also be able to do things like this:\r\n\r\n```js\r\nvar TodoActions = Actions({\r\n  _log ( msg ) {\r\n    // ...\r\n  },\r\n\r\n  create ( text ) {\r\n    this._log( `Adding todo: ${text}` );\r\n    // ...\r\n  }\r\n});\r\n```"},"comment":{"url":"https://api.github.com/repos/ThunderCatsJS/thundercats/issues/comments/128475223","html_url":"https://github.com/ThunderCatsJS/thundercats/issues/77#issuecomment-128475223","issue_url":"https://api.github.com/repos/ThunderCatsJS/thundercats/issues/77","id":128475223,"user":{"login":"BerkeleyTrue","id":6775919,"avatar_url":"https://avatars.githubusercontent.com/u/6775919?v=3","gravatar_id":"","url":"https://api.github.com/users/BerkeleyTrue","html_url":"https://github.com/BerkeleyTrue","followers_url":"https://api.github.com/users/BerkeleyTrue/followers","following_url":"https://api.github.com/users/BerkeleyTrue/following{/other_user}","gists_url":"https://api.github.com/users/BerkeleyTrue/gists{/gist_id}","starred_url":"https://api.github.com/users/BerkeleyTrue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BerkeleyTrue/subscriptions","organizations_url":"https://api.github.com/users/BerkeleyTrue/orgs","repos_url":"https://api.github.com/users/BerkeleyTrue/repos","events_url":"https://api.github.com/users/BerkeleyTrue/events{/privacy}","received_events_url":"https://api.github.com/users/BerkeleyTrue/received_events","type":"User","site_admin":false},"created_at":"2015-08-06T19:03:32Z","updated_at":"2015-08-06T19:03:32Z","body":"That is strange... I feel like the context should be undefined at that point.\r\n\r\nIf I walk through this...\r\n<steps through code using dev tools>\r\n\r\nWow, that is strange. The context on that line is the actions object... ok cool. You learn something new every day.\r\n \r\nIf this ^ is true shouldn't this:\r\n```js\r\nvar Logger = stampit().methods({\r\n  log ( msg ) {\r\n    // ...\r\n  }\r\n});\r\n\r\nvar TodoActions = Logger.compose(Actions({\r\n  create ( text ) {\r\n    this.log( `Adding todo: ${text}` );\r\n    // ...\r\n  }\r\n}));\r\n```\r\n\r\nwork as well? The context in action function is the actions object. That means the map function would get its context from the action function which is the stamp instance. @joshdmiller Have you tried the compose function and found it did not work?\r\n"}}