title: React + Typescript: How to type event.target.name to state?
body: <p>I have som react state that was defined as an interface and has specificall named keys...</p>
  
  <p>I tried a solution below that should technically work based on the state keys, but it still gives me the error</p>
  
  <pre><code>{ [x: string]: string; }' provides no match for the signature  ...
  </code></pre>
  
  <p>What is the best way to do this...</p>
  
  <pre><code>interface State {
      responses: string,
      comments: string,
  }
  
  
    state = {
      responses: '',
      comments: '',
    };
  
    handleChange = (e: React.ChangeEvent&lt;HTMLInputElement&gt;, value: string): void =&gt; {
      const key = e.currentTarget.name;
      Object.keys(this.state).forEach(k =&gt; {
        if (k === key) this.setState({ [e.currentTarget.name]: value });
      })
    }
  </code></pre>