title: Dynamic form field using react hooks
body: <p>I'm trying to gather the input data from a form dynamically rather than typing out each individual input field name.  This was pretty easy using standard React, but I'm switching over to React Hooks and now I'm a bit confused on how to achieve the same goal.</p>
  
  <pre><code>const gatherFormData = e =&gt; {
    if (e.target.value !== null) {
      _.assign(
        formData.payload,
        { [e.target.name]: e.target.value, action },
        { groupNumber },
      );
      setState({ 
        [e.target.name]: (e.target.value),
        formData
      });
    }
  };
  </code></pre>
  
  <p>I tried using template literal syntax, but that didn't work.</p>
  
  <pre><code>set`${e.target.name}`(e.target.value);
  </code></pre>