title: React.js: Identifying different inputs with one onChange handler
body: <p>Curious what the right way to approach this is:</p>
  
  <pre><code>var Hello = React.createClass({
  getInitialState: function() {
      return {total: 0, input1:0, input2:0};
  },
  render: function() {
      return (
          &lt;div&gt;{this.state.total}&lt;br/&gt;
              &lt;input type="text" value={this.state.input1} onChange={this.handleChange} /&gt;
              &lt;input type="text" value={this.state.input2} onChange={this.handleChange} /&gt;
          &lt;/div&gt;
      );
  },
  handleChange: function(e){
      this.setState({ ??? : e.target.value});
      t = this.state.input1 + this.state.input2;
      this.setState({total: t});
  }
  });
  
  React.renderComponent(&lt;Hello /&gt;, document.getElementById('content'));
  </code></pre>
  
  <p>Obviously you could create separate handleChange functions to handle each different input, but that's not very nice.  Similarly you could create a component just for an individual input, but I wanted to see if there's a way to do it like this.</p>