{"action":"created","issue":{"url":"https://api.github.com/repos/andreypopp/autobind-decorator/issues/32","repository_url":"https://api.github.com/repos/andreypopp/autobind-decorator","labels_url":"https://api.github.com/repos/andreypopp/autobind-decorator/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/andreypopp/autobind-decorator/issues/32/comments","events_url":"https://api.github.com/repos/andreypopp/autobind-decorator/issues/32/events","html_url":"https://github.com/andreypopp/autobind-decorator/issues/32","id":167710791,"number":32,"title":"\"Cannot set property\" error on React class component method","user":{"login":"DelvarWorld","id":79215,"avatar_url":"https://avatars.githubusercontent.com/u/79215?v=3","gravatar_id":"","url":"https://api.github.com/users/DelvarWorld","html_url":"https://github.com/DelvarWorld","followers_url":"https://api.github.com/users/DelvarWorld/followers","following_url":"https://api.github.com/users/DelvarWorld/following{/other_user}","gists_url":"https://api.github.com/users/DelvarWorld/gists{/gist_id}","starred_url":"https://api.github.com/users/DelvarWorld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DelvarWorld/subscriptions","organizations_url":"https://api.github.com/users/DelvarWorld/orgs","repos_url":"https://api.github.com/users/DelvarWorld/repos","events_url":"https://api.github.com/users/DelvarWorld/events{/privacy}","received_events_url":"https://api.github.com/users/DelvarWorld/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-07-26T21:01:07Z","updated_at":"2016-08-13T12:06:20Z","closed_at":null,"body":"I'm guessing I'm missing something but not sure what.\r\n\r\nMy `.babelrc`:\r\n\r\n```javascript\r\n{\r\n  \"presets\": [\"react\", \"es2015\", \"stage-0\"],\r\n\r\n  \"plugins\": [\r\n    \"transform-decorators-legacy\"\r\n  ],\r\n\r\n  \"env\": {\r\n    \"development\": {\r\n      \"plugins\": [ \"typecheck\" ]\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nMy webpack loader config:\r\n\r\n```javascript\r\n{\r\n    test: /\\.jsx?$/,\r\n    exclude: /node_modules/,\r\n    loaders: [ 'react-hot', 'babel?presets[]=es2015&presets[]=react&presets[]=stage-0&plugins[]=transform-decorators-legacy' ]\r\n}\r\n```\r\n\r\nMy `.eslintrc` (I have no idea if both of these are needed):\r\n\r\n```javascript\r\n  \"parser\": \"babel-eslint\",\r\n  \"settings\": {\r\n    \"import/parser\": \"babel-eslint\",\r\n```\r\n\r\nIn my React component, I use the autobind decorator:\r\n\r\n```javascript\r\nimport autobind from 'autobind-decorator';\r\n\r\nexport default class Home extends Component {\r\n\r\n    @autobind\r\n    onPress() {}\r\n\r\n}\r\n```\r\n\r\nBut I get the runtime error:\r\n\r\n> makeAssimilatePrototype.js:21 Uncaught TypeError: Cannot set property onPress of #<Home> which has only a getter\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/andreypopp/autobind-decorator/issues/comments/239617641","html_url":"https://github.com/andreypopp/autobind-decorator/issues/32#issuecomment-239617641","issue_url":"https://api.github.com/repos/andreypopp/autobind-decorator/issues/32","id":239617641,"user":{"login":"VinceFanZ","id":7631809,"avatar_url":"https://avatars.githubusercontent.com/u/7631809?v=3","gravatar_id":"","url":"https://api.github.com/users/VinceFanZ","html_url":"https://github.com/VinceFanZ","followers_url":"https://api.github.com/users/VinceFanZ/followers","following_url":"https://api.github.com/users/VinceFanZ/following{/other_user}","gists_url":"https://api.github.com/users/VinceFanZ/gists{/gist_id}","starred_url":"https://api.github.com/users/VinceFanZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VinceFanZ/subscriptions","organizations_url":"https://api.github.com/users/VinceFanZ/orgs","repos_url":"https://api.github.com/users/VinceFanZ/repos","events_url":"https://api.github.com/users/VinceFanZ/events{/privacy}","received_events_url":"https://api.github.com/users/VinceFanZ/received_events","type":"User","site_admin":false},"created_at":"2016-08-13T12:06:20Z","updated_at":"2016-08-13T12:06:20Z","body":"I've had the same problem."}}
{"actor":{"display_login":"VinceFanZ"}}