title: TypeScript & React - one onChange Handler for multiple input fields
body: <p>Say I have a form with multiple input fields. In normal ES6/React I would create a single method that all input fields would point their <code>onChange</code> handlers to. Something like this:</p>
  
  <pre><code>handleChange(e) {
      e.preventDefault();
      this.setState({[e.target.name]: e.target.value});
  }
  </code></pre>
  
  <p>This helps in the case where you have a lot of form elements and don't have to create a specific method to handle each of them.</p>
  
  <p>Is this possible in TypeScript? Even if it is not type-safe?</p>