Update refs-and-the-dom.md (#8250)
Since a lot of projects use [airbnb eslint config](https://www.npmjs.com/package/eslint-config-airbnb) where [this rule](http://eslint.org/docs/rules/no-return-assign) is enabled (and its a good rule) some people might get confused when they are trying this out in their project.
Arni Fannar committed
Nov 9, 2016 at 22:45 UTC
f4059e5e5b426224721b19f03fecea94335a5d3b
1 file changed
+3
-3
docs/docs/refs-and-the-dom.md
+3
-3
@@ -38,7 +38,7 @@ class CustomTextInput extends React.Component {
38
<div>
39
<input
40
type="text"
41
- ref={(input) => this.textInput = input} />
41
+ ref={(input) => { this.textInput = input; }} />
42
<input
43
type="button"
44
value="Focus the text input"
@@ -65,7 +65,7 @@ class AutoFocusTextInput extends React.Component {
65
render() {
66
return (
67
<CustomTextInput
68
- ref={(input) => this.textInput = input} />
68
+ ref={(input) => { this.textInput = input; }} />
69
);
70
}
71
}
@@ -86,7 +86,7 @@ function CustomTextInput(props) {
86
<div>
87
<input
88
type="text"
89
- ref={(input) => textInput = input} />
89
+ ref={(input) => { textInput = input; }} />
90
<input
91
type="button"
92
value="Focus the text input"