How to set focus to an input element when it enters the DOM?
input
When a button is clicked the input element is displayed. How to set the focu
In the componentDidMount and componentDidUpdate hooks do this:
componentDidMount
componentDidUpdate
ReactDOM.findDOMNode(this.refs.myInput).focus()