title: Focus on next field when pressing enter React.js
body: <p>I would like to find a way to focus on the next field when I click enter in the input using React.js</p>
  
  <pre><code>  @autobind
    handleKeyPress(event){
      if(event.key === 'Enter'){
        this.refs.email.focus();
      }
    }
  
    @autobind
    handleKeyPressEmail(event){
      if(event.key === 'Enter'){
        this.refs.zip_code.focus();
      }
    }
  
          &lt;input
            onKeyPress={this.handleKeyPress}
            ref = 'name'
          /&gt;
  
          &lt;input
            onKeyPress={this.handleKeyPressEmail}
            ref = 'email'
          /&gt;
  
          &lt;input
            ref = 'zip_code'
          /&gt;
  </code></pre>
  
  <p>This is the best way I have found so far, however I don't want to repeat myself by creating a function everytime I want that to happen. Is there a better and cleaner way to implement this?</p>