mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-13 13:48:12 -05:00
Add curlies around ref function body
The example we have here uses an implicit return, which is forbidden when assigning. This triggers the no-return-assign rule. Fixes #980
This commit is contained in:
@@ -337,7 +337,7 @@
|
||||
|
||||
// good
|
||||
<Foo
|
||||
ref={(ref) => this.myRef = ref}
|
||||
ref={ref => { this.myRef = ref; }}
|
||||
/>
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user