-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linter complains when using arrow function for refs #528
Comments
You are probably writing <TextInput ref={(c) => this._input = c} /> if you add <TextInput ref={(c) => { this._input = c; }} /> |
Oh yep, that was the problem. Thanks for the clarification. |
I’m actually not sure we should keep this rule. |
@mrscobbler Would you like to send a PR to remove this rule? It should be in |
Yes, sure I'll take care of it. |
Just submitted a pull request: #529 |
Fixed via #529, will be out in the next version. |
I'm using arrow function for refs as explained in the docs here: https://facebook.github.io/react/docs/more-about-refs.html
but the linter complains with this:
217:54 warning Arrow function should not return assignment
Is there an issue with the way the docs describe how to use arrow functions with refs? Should the docs be updated?
The text was updated successfully, but these errors were encountered: