title: for what purpose we write e.target.name into the state definition statement?
body: <p>I dont have a clear concrete understanding of why we write e.target.name into the state definition statement in react. Who can explain ? thanks in advance.</p>
  
  <pre><code>checkboxChange(e) {
  
  let state = {
    ...this.state,
    [e.target.name]: !this.state[e.target.name]
  };
  ...
  </code></pre>
  
  <p>why we write</p>
  
  <pre><code> [e.target.name]: !this.state[e.target.name]
  </code></pre>
  
  <p>in the state</p>