title: pass event and object to function in react
body: <p>I'm new to react trying to implement <code>Redux</code> I'm trying to update state when a text-input gets updated. I'm able to extract the <code>e.target.value</code> but it also needs to be aware of what object was changed</p>
  
  <p>For example my data might be something like:</p>
  
  <pre><code>{ name: 'Penny', namePlural: 'Pennies', label: '1¢', value: .01, sum: 0 },
  { name: 'Nickel', namePlural: 'Nickels', label: '5¢', value: .05, sum: 0 },
  { name: 'Dime', namePlural: 'Dimes', label: '10¢', value: .10, sum: 0 },
  { name: 'Quarter', namePlural: 'Quarters', label: '25¢', value: .25, sum: 0 }
  </code></pre>
  
  <p>I need to update the <code>sum</code> for a particular denomination.</p>
  
  <p>Here is what I have for my presentation component</p>
  
  <pre><code>import React, { Component } from 'react';
  import PropTypes from 'prop-types';
  
  class DenomInput extends Component {
      constructor(props) {
          super(props);
          this.state = {
              denom: props.denom
          }
      }
  
      handleKeyUp = (e) =&gt; {
          this.props.onDenomChange(e.target.value);
      }
  
      render() {
          return (
              &lt;div className="input-group denom"&gt;
                  &lt;span className="input-group-addon"&gt;{this.state.denom.label}&lt;/span&gt;
                  &lt;input
                      type="text"
                      className="form-control"
                      onChange={this.handleKeyUp}
                      value={this.state.denom.sum} /&gt;
  
                  &lt;span className="input-group-addon"&gt;{this.state.denom.count | 0}&lt;/span&gt;
              &lt;/div&gt;
          );
      }
  }
  
  DenomInput.PropTypes = {
      denom: PropTypes.object.isRequired
  }
  
  export default DenomInput;
  </code></pre>
  
  <p>With this I'm able to get the value of the input field, but how could I pass up which denomination I'm currently on as well?</p>