title: Set button id to state when clicked
body: <p><strong>Goal:</strong> Grab button id <code>9:00am</code> and set it as state with <code>setTime</code></p>
  <p>I'm using a functional component:</p>
  <pre class="lang-js prettyprint-override"><code>
  function Appointment() {
    const [time, setTime] = useState();
  
    const handleTime = (e) =&gt; {
      const id = e.target.id;
      setTime(id);
      console.log(id);
    };
  </code></pre>
  <p>And here is the code that grabs the id:</p>
  <pre class="lang-js prettyprint-override"><code>&lt;div className=&quot;appointment__timeSlots&quot;&gt;
              &lt;button
                className=&quot;appointment__button&quot;
                id=&quot;9:00am&quot;
                onClick={handleTime}
              &gt;
                9:00am
              &lt;/button&gt;
            &lt;/div&gt;
  </code></pre>
  <p><strong>NOTE</strong> My console log isn't printing anything which is making it very hard to debug.</p>
  <p>Any help would be appreciated.</p>