title: React - Focus on input using name
body: <p>I have a component with input, is there any way to focus using the name?</p>
  
  <pre><code>&lt;div onClick={this.handleClick.bind(this)}&gt;
      ... Some more code ...
          &lt;input type="text" name={this.props.name} onChange={this.props.onChange} autoFocus/&gt;
      ... Some more code ...
  &lt;/div&gt;
  </code></pre>
  
  <p>On click of the parent div, I have a on click event attached to it.</p>
  
  <pre><code>handleClick(e) {
      // Need to focus may be using refs, but not sure how to do it.
      return this.props.onClick(this.props.name);
  }
  </code></pre>