{"action":"created","issue":{"url":"https://api.github.com/repos/acdlite/recompose/issues/436","repository_url":"https://api.github.com/repos/acdlite/recompose","labels_url":"https://api.github.com/repos/acdlite/recompose/issues/436/labels{/name}","comments_url":"https://api.github.com/repos/acdlite/recompose/issues/436/comments","events_url":"https://api.github.com/repos/acdlite/recompose/issues/436/events","html_url":"https://github.com/acdlite/recompose/issues/436","id":244618964,"number":436,"title":"breaking change in lifecycle. this not automatically bound to custom functions","user":{"login":"bonjowi","id":9975760,"avatar_url":"https://avatars2.githubusercontent.com/u/9975760?v=4","gravatar_id":"","url":"https://api.github.com/users/bonjowi","html_url":"https://github.com/bonjowi","followers_url":"https://api.github.com/users/bonjowi/followers","following_url":"https://api.github.com/users/bonjowi/following{/other_user}","gists_url":"https://api.github.com/users/bonjowi/gists{/gist_id}","starred_url":"https://api.github.com/users/bonjowi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bonjowi/subscriptions","organizations_url":"https://api.github.com/users/bonjowi/orgs","repos_url":"https://api.github.com/users/bonjowi/repos","events_url":"https://api.github.com/users/bonjowi/events{/privacy}","received_events_url":"https://api.github.com/users/bonjowi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-07-21T09:47:47Z","updated_at":"2017-07-21T11:12:49Z","closed_at":null,"body":"Updated recompose from 2.0.2 to 2.4.0 to get rid of React.createClass deprecation warning.\r\n\r\nDiscovered breaking change in lifecycle\r\n\r\nCode which used to work:\r\n```\r\nfunction componentDidMount() {\r\n    this.anotherFunction()\r\n}\r\n\r\nfunction anotherFunction() {\r\n    this.props.dispatch()\r\n}\r\n\r\nlifecycle({\r\n    componentDidMount,\r\n    anotherFunction\r\n})(Component)\r\n```\r\n\r\nNow gives error: \r\n```\r\nUncaught TypeError: Cannot read property 'dispatch' of undefined at anotherFunction\r\n```\r\n\r\nNow I am required to bind this\r\n`this.anotherFunction().bind(this)`"},"comment":{"url":"https://api.github.com/repos/acdlite/recompose/issues/comments/316974823","html_url":"https://github.com/acdlite/recompose/issues/436#issuecomment-316974823","issue_url":"https://api.github.com/repos/acdlite/recompose/issues/436","id":316974823,"user":{"login":"bonjowi","id":9975760,"avatar_url":"https://avatars2.githubusercontent.com/u/9975760?v=4","gravatar_id":"","url":"https://api.github.com/users/bonjowi","html_url":"https://github.com/bonjowi","followers_url":"https://api.github.com/users/bonjowi/followers","following_url":"https://api.github.com/users/bonjowi/following{/other_user}","gists_url":"https://api.github.com/users/bonjowi/gists{/gist_id}","starred_url":"https://api.github.com/users/bonjowi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bonjowi/subscriptions","organizations_url":"https://api.github.com/users/bonjowi/orgs","repos_url":"https://api.github.com/users/bonjowi/repos","events_url":"https://api.github.com/users/bonjowi/events{/privacy}","received_events_url":"https://api.github.com/users/bonjowi/received_events","type":"User","site_admin":false},"created_at":"2017-07-21T11:12:49Z","updated_at":"2017-07-21T11:12:49Z","body":"@Andarist I've just found out it's only happening when i use an eventlistener as such:\r\n\r\n```\r\nwindow.addEventListener('resize', this.updateDimension);\r\n```\r\n\r\nI have updated the example too"}}
{"actor":{"display_login":"bonjowi"}}