Created
July 13, 2016 08:00
-
-
Save kazagkazag/e309dcc0c21f73dca10c46e1864217c1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyComponent extends Component { | |
render() { | |
return <input ref={(element) => this._input = element} />; | |
} | |
componentDidMount() { | |
this._input.focus(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment