title: Number input is string not integer in React
body: <p>I have a react component. Im passing the updateInventory function down from my top level component. </p>
  
  <pre><code>class Inventory extends Component {
    constructor(props) {
      super(props);
      this.state = {
        name: this.props.name,
        price: this.props.price,
        id: this.props.id
      };
      this.handleChange = this.handleChange.bind(this);
    }
  
    handleChange(e) {
      this.setState({
        [e.target.name]: e.target.value
      });
    }
  
    render(props) {
      return (
        &lt;form onSubmit={(e)=&gt;this.props.updateInventory(e, this.state)}&gt;
          &lt;input name='name' value={this.state.name} onChange={this.handleChange} /&gt;
          &lt;input name='price' type='number' value={this.state.price} onChange={this.handleChange} /&gt;
          &lt;button type='submit'&gt;Update&lt;/button&gt;
        &lt;/form&gt;
      )
    }
  };
  
  export default Inventory;
  </code></pre>
  
  <p>In my top level component: </p>
  
  <pre><code>updateInventory = (e, state) =&gt; {
    let pizzaState = this.state.pizzas;
    const index = pizzaState.findIndex((pizza)=&gt;{
      return pizza.id === state.id;
    });
    Object.assign(pizzaState[index], state);
    console.log( pizzaState );
    e.preventDefault();
  };
  </code></pre>
  
  <p>This appears to be working so far (I havn't updated my top level state yet) but I can see that when I update the price the new value is a string not an integer. I was hoping to just have the one handleChange function for all my inputs as ill be adding some more, is this possible? </p>