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.
This commit is contained in:
Arni Fannar
2016-11-09 22:45:21 +00:00
committed by Kevin Lacker
parent 0087b527af
commit 10733f084a

View File

@@ -38,7 +38,7 @@ class CustomTextInput extends React.Component {
<div>
<input
type="text"
ref={(input) => this.textInput = input} />
ref={(input) => { this.textInput = input; }} />
<input
type="button"
value="Focus the text input"
@@ -65,7 +65,7 @@ class AutoFocusTextInput extends React.Component {
render() {
return (
<CustomTextInput
ref={(input) => this.textInput = input} />
ref={(input) => { this.textInput = input; }} />
);
}
}
@@ -86,7 +86,7 @@ function CustomTextInput(props) {
<div>
<input
type="text"
ref={(input) => textInput = input} />
ref={(input) => { textInput = input; }} />
<input
type="button"
value="Focus the text input"