title: (React) Uncaught TypeError: Cannot read property 'this' of undefined when using refs
body: <p>I am trying to refer to an input field using a ref in React, however I am receiving the error:  "Uncaught TypeError: Cannot read property 'this' of undefined". The ref is defined, however. Is there a reason why React is unable to find the ref in my code? </p>
  
  <pre><code>    export default class ContractorSignUp extends Component {
  
  
    constructor(props) {
      super(props);
  
      this.handleSubmit = this.handleSubmit.bind(this);
    }
  
    handleSubmit(event) {
      event.preventDefault();
  
      // Find the text field via the React ref
      const user = ReactDOM.this.refs.emailInput.value.trim();
  
      // Clear form
      ReactDOM.this.refs.emailInput.value = '';
    }
  
  
    render() {
  
      return (
              &lt;form onSubmit={this.handleSubmit.bind(this)}&gt;
  
                &lt;input className="textinput" type="e-mail" placeholder="E-mail" ref="emailInput"&gt;
                &lt;/input&gt;
  
            &lt;button id="formsubmitbutton" onClick={this.handleSubmit.bind(this)}&gt;&lt;span&gt;Submit&lt;/span&gt;&lt;/button&gt;
  
              &lt;/form&gt;
                                      )
    }
  };
  </code></pre>