title: reactjs: how to access ref values in v15.1.0
body: <p>I have the following piece of code that works in ReactJS v0.13.x:</p>
  
  <pre><code>  handleEmail: function(e) {
        if (e.key === "Enter") {
            var input_text = this.refs.email.getDOMNode().value;      
            // more code here ....
        }
    },
    render: function() {
        return (
          &lt;div className='dlg' onClick={this.handleClick}&gt;
            &lt;p&gt;
              &lt;span className="msg"&gt;{this.state.msg}&lt;/span&gt;
              &lt;input type="text" onKeyPress={this.handleEmail} ref="email" /&gt;
            &lt;/p&gt;
          &lt;/div&gt;
        )
    }
  </code></pre>
  
  <p>Now I've tried to convert this code to make it compatible with react v15.0.1, and I've tried something like this:</p>
  
  <pre><code>  handleEmail(e) {
        if (e.key === "Enter") {
            var input_text = ReactDOM.findDOMNode(this.refs.email).value;;       
            // more code here ....
        }
    }
    render() {
        return (
          &lt;div className='dlg' onClick={this.handleClick}&gt;
            &lt;p&gt;
              &lt;span className="msg"&gt;{this.state.msg}&lt;/span&gt;
              &lt;input type="text" onKeyPress={this.handleEmail} ref="email" /&gt;
            &lt;/p&gt;
          &lt;/div&gt;
        )
    }
  </code></pre>
  
  <p>but it fails, I've debugged the code and found that, using the newest syntax, 'this' is null in handleEmail function. </p>
  
  <p>Does anybody have any hint why worked before and not now? (and most important :) ... how to fix this?)</p>