title: ReactJS onChange function
body: <p>Where am I going wrong with my onChange function? I want to be able to type in my textbox, but I keep getting the following console error when I recompile:</p>
  
  <pre><code>**Uncaught TypeError: Cannot read property 'value' of undefined**
  </code></pre>
  
  <p>See code below:</p>
  
  <pre><code>var name = "";
  export default React.createClass({
  
    handleChange: function() {
      this.props.onUserInput(
          this.refs.name.value    
      )
    },
  
    render() {
      return (
        &lt;div&gt;
          &lt;div&gt;{this.props.children}&lt;/div&gt;
          &lt;Well style={style.well}&gt;
            &lt;div style={style.userContent}&gt;
  
              &lt;input style={style.userDetails} 
                     id ="userName" 
                     type="text" 
                     onChange={this.handleChange()} 
                     value ={name} /&gt;
  
                &lt;Button bsStyle="primary"&gt;Update&lt;/Button&gt;
            &lt;/div&gt;
          &lt;/Well&gt;         
        &lt;/div&gt;
      );
    }
  });
  </code></pre>