{"action":"created","issue":{"url":"https://api.github.com/repos/tc39/proposal-decorators/issues/146","repository_url":"https://api.github.com/repos/tc39/proposal-decorators","labels_url":"https://api.github.com/repos/tc39/proposal-decorators/issues/146/labels{/name}","comments_url":"https://api.github.com/repos/tc39/proposal-decorators/issues/146/comments","events_url":"https://api.github.com/repos/tc39/proposal-decorators/issues/146/events","html_url":"https://github.com/tc39/proposal-decorators/issues/146","id":354649422,"node_id":"MDU6SXNzdWUzNTQ2NDk0MjI=","number":146,"title":"Please don't pollute javascript standards with framework specifics","user":{"login":"matthieusieben","id":813661,"node_id":"MDQ6VXNlcjgxMzY2MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/813661?v=4","gravatar_id":"","url":"https://api.github.com/users/matthieusieben","html_url":"https://github.com/matthieusieben","followers_url":"https://api.github.com/users/matthieusieben/followers","following_url":"https://api.github.com/users/matthieusieben/following{/other_user}","gists_url":"https://api.github.com/users/matthieusieben/gists{/gist_id}","starred_url":"https://api.github.com/users/matthieusieben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthieusieben/subscriptions","organizations_url":"https://api.github.com/users/matthieusieben/orgs","repos_url":"https://api.github.com/users/matthieusieben/repos","events_url":"https://api.github.com/users/matthieusieben/events{/privacy}","received_events_url":"https://api.github.com/users/matthieusieben/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-08-28T09:38:34Z","updated_at":"2018-10-22T19:13:49Z","closed_at":null,"author_association":"NONE","body":"The whole rationale behind `@bound` is wrong because it tries to fix an error which is not inerrant to Javascript but to React. In javascript, functions need to be called with the proper context. If your framework does not allow you to write \"concise, expressive code\", blame the framework, not the language.\r\n\r\nThe arguments are clearly biased towards the use in a React project. As such, they lack objectiveness and are not proposal material."},"comment":{"url":"https://api.github.com/repos/tc39/proposal-decorators/issues/comments/431943745","html_url":"https://github.com/tc39/proposal-decorators/issues/146#issuecomment-431943745","issue_url":"https://api.github.com/repos/tc39/proposal-decorators/issues/146","id":431943745,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTk0Mzc0NQ==","user":{"login":"burdiuz","id":255853,"node_id":"MDQ6VXNlcjI1NTg1Mw==","avatar_url":"https://avatars1.githubusercontent.com/u/255853?v=4","gravatar_id":"","url":"https://api.github.com/users/burdiuz","html_url":"https://github.com/burdiuz","followers_url":"https://api.github.com/users/burdiuz/followers","following_url":"https://api.github.com/users/burdiuz/following{/other_user}","gists_url":"https://api.github.com/users/burdiuz/gists{/gist_id}","starred_url":"https://api.github.com/users/burdiuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/burdiuz/subscriptions","organizations_url":"https://api.github.com/users/burdiuz/orgs","repos_url":"https://api.github.com/users/burdiuz/repos","events_url":"https://api.github.com/users/burdiuz/events{/privacy}","received_events_url":"https://api.github.com/users/burdiuz/received_events","type":"User","site_admin":false},"created_at":"2018-10-22T19:13:49Z","updated_at":"2018-10-22T19:13:49Z","author_association":"NONE","body":"Specifically for binding class methods I use babel plugin for class properties with arrow functions. In this case functions are being created in class constructor which automatically gives them context of the current instance. This looks clean and easy to understand and can be used anywhere.\r\nexample:\r\n```javascript\r\nclass ActionIconButton extends Component {\r\n  componentWillReceiveProps({ action }) {\r\n    this.setState({\r\n      action: getAction(action),\r\n    });\r\n  }\r\n\r\n  renderIcon = ({ action, iconSize, iconStyle }) => {\r\n    return renderIconFromAction(action, iconSize, iconStyle);\r\n  };\r\n\r\n  onPress = (event) => {\r\n    const { onPress, onAction } = this.props;\r\n\r\n    if (onPress) {\r\n      onPress(event);\r\n    }\r\n\r\n    if (onAction) {\r\n      onAction(this.state.action);\r\n    }\r\n  };\r\n\r\n  render() {\r\n    return (\r\n      <IconButton\r\n        {...this.props}\r\n        onPress={this.onPress}\r\n        iconRenderer={this.renderIcon}\r\n      />\r\n    );\r\n  }\r\n}\r\n\r\nexport default ActionIconButton;\r\n```\r\nProposal for class properties:\r\nhttps://github.com/tc39/proposal-class-fields"}}
{"actor":{"display_login":"burdiuz"}}