Browse Source

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.
main
Arni Fannar 8 years ago
committed by Kevin Lacker
parent
commit
10733f084a
  1. 6
      docs/refs-and-the-dom.md

6
docs/refs-and-the-dom.md

@ -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"

Loading…
Cancel
Save