{"action":"opened","issue":{"url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/issues/1950","repository_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react","labels_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/issues/1950/labels{/name}","comments_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/issues/1950/comments","events_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/issues/1950/events","html_url":"https://github.com/yannickcr/eslint-plugin-react/issues/1950","id":352475069,"node_id":"MDU6SXNzdWUzNTI0NzUwNjk=","number":1950,"title":"[react/destructuring-assignment] callback conflicts with props destructuring","user":{"login":"pilarArr","id":26302137,"node_id":"MDQ6VXNlcjI2MzAyMTM3","avatar_url":"https://avatars0.githubusercontent.com/u/26302137?v=4","gravatar_id":"","url":"https://api.github.com/users/pilarArr","html_url":"https://github.com/pilarArr","followers_url":"https://api.github.com/users/pilarArr/followers","following_url":"https://api.github.com/users/pilarArr/following{/other_user}","gists_url":"https://api.github.com/users/pilarArr/gists{/gist_id}","starred_url":"https://api.github.com/users/pilarArr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pilarArr/subscriptions","organizations_url":"https://api.github.com/users/pilarArr/orgs","repos_url":"https://api.github.com/users/pilarArr/repos","events_url":"https://api.github.com/users/pilarArr/events{/privacy}","received_events_url":"https://api.github.com/users/pilarArr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-21T10:16:38Z","updated_at":"2018-08-21T10:16:38Z","closed_at":null,"author_association":"NONE","body":"I'm having issues with this rule when I use callbacks. For example:\r\n\r\n```javascript\r\nclass Example extends Component {\r\n\r\n  callbackMethod = () => {\r\n    const { someProp, anotherProp } = this.props;\r\n    // do stuff with the props\r\n    // now I save anotherProp in the database with function\r\n    functionWithCallback( anotherProp, (error, result) => {\r\n      // when this is saved the props are updated after fetching the \r\n      // new ones from the database the but if I use \r\n      // the destructured props from the first statement I get the \r\n      // old props and if I destructure here I get name conflicts \r\n    } )\r\n  }\r\n\r\n  render() {\r\n    const { foo } = this.props;\r\n\r\n    return <div onClick={this.callbackMethod}>{foo.bar}</div>;\r\n  }\r\n}\r\n```\r\n\r\nThis is my problem with this rule right now and I'm not sure how I should tackle this."}}
{"actor":{"display_login":"pilarArr"}}