title: How to give a name/value attribute to a select field?
body: <p>I have these 2 functions:</p>
  
  <pre><code>  handleHomeInput = (e) =&gt; {
      let stateCopy = { ...this.state };
      stateCopy.home.name = e.target.innerText;
      this.setState(stateCopy);
    };
  
    handleAwayInput = (e) =&gt; {
      let stateCopy = { ...this.state };
      stateCopy.away.name = e.target.innerText;
      this.setState(stateCopy);
    };
  </code></pre>
  
  <p>clearly very similar and could be refactored into 1 method.</p>
  
  <p>these methods both take the innerText of a dropdown. If they were normal inputs I could take the name or value attribute from <code>e.target.value</code> and then could refactor line 3. however this is not possible as dropdowns don't seem to have that value param on them.</p>
  
  <p>I am using semantic-ui by the way. any ideas how I could refactor these?</p>
  
  <p>my state just looks like this:</p>
  
  <pre><code>state = {
      home: {
        name: '',
        goals: 0
      },
      away: {
        name: '',
        goals: 0
      },
  </code></pre>