Skip to content

Instantly share code, notes, and snippets.

@kazagkazag
Created July 13, 2016 08:00
Show Gist options
  • Save kazagkazag/e309dcc0c21f73dca10c46e1864217c1 to your computer and use it in GitHub Desktop.
Save kazagkazag/e309dcc0c21f73dca10c46e1864217c1 to your computer and use it in GitHub Desktop.
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