{"action":"created","issue":{"url":"https://api.github.com/repos/airbnb/javascript/issues/659","labels_url":"https://api.github.com/repos/airbnb/javascript/issues/659/labels{/name}","comments_url":"https://api.github.com/repos/airbnb/javascript/issues/659/comments","events_url":"https://api.github.com/repos/airbnb/javascript/issues/659/events","html_url":"https://github.com/airbnb/javascript/issues/659","id":125200596,"number":659,"title":"react/jsx-no-bind: how to pass args from callbacks?","user":{"login":"alexfedoseev","id":4244251,"avatar_url":"https://avatars.githubusercontent.com/u/4244251?v=3","gravatar_id":"","url":"https://api.github.com/users/alexfedoseev","html_url":"https://github.com/alexfedoseev","followers_url":"https://api.github.com/users/alexfedoseev/followers","following_url":"https://api.github.com/users/alexfedoseev/following{/other_user}","gists_url":"https://api.github.com/users/alexfedoseev/gists{/gist_id}","starred_url":"https://api.github.com/users/alexfedoseev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexfedoseev/subscriptions","organizations_url":"https://api.github.com/users/alexfedoseev/orgs","repos_url":"https://api.github.com/users/alexfedoseev/repos","events_url":"https://api.github.com/users/alexfedoseev/events{/privacy}","received_events_url":"https://api.github.com/users/alexfedoseev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-06T15:38:45Z","updated_at":"2016-01-06T18:12:14Z","closed_at":null,"body":"I have a question about `react/jsx-no-bind` rule in `3.0.0`: how can I pass args to handler from callback if I can't use bind and arrow functions?\r\n\r\n```jsx\r\ndoSomething(thing) { ... }\r\n\r\nrender() {\r\n  const { items } = this.props;\r\n\r\n  return (\r\n    <ul>\r\n    {\r\n      items.map(item => (\r\n        <li onClick={this.doSomething.bind(this, item)} /> // <--- JSX props should not use .bind()\r\n        <li onClick={() => this.doSomething(item)} />      // <--- JSX props should not use arrow functions\r\n      ))\r\n    }\r\n    </ul>\r\n  );\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/airbnb/javascript/issues/comments/169407706","html_url":"https://github.com/airbnb/javascript/issues/659#issuecomment-169407706","issue_url":"https://api.github.com/repos/airbnb/javascript/issues/659","id":169407706,"user":{"login":"ljharb","id":45469,"avatar_url":"https://avatars.githubusercontent.com/u/45469?v=3","gravatar_id":"","url":"https://api.github.com/users/ljharb","html_url":"https://github.com/ljharb","followers_url":"https://api.github.com/users/ljharb/followers","following_url":"https://api.github.com/users/ljharb/following{/other_user}","gists_url":"https://api.github.com/users/ljharb/gists{/gist_id}","starred_url":"https://api.github.com/users/ljharb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljharb/subscriptions","organizations_url":"https://api.github.com/users/ljharb/orgs","repos_url":"https://api.github.com/users/ljharb/repos","events_url":"https://api.github.com/users/ljharb/events{/privacy}","received_events_url":"https://api.github.com/users/ljharb/received_events","type":"User","site_admin":false},"created_at":"2016-01-06T18:12:14Z","updated_at":"2016-01-06T18:12:14Z","body":"Ah, that's a fair point. you may not want to do that either. You could use the index of the `<li>` to look it up in `this.props.items`, but that seems a bit janky.\r\n\r\nCan you be a bit more specific about your use case? I'm curious what prompts this to come up."}}