title: How to trigger state change from child to parent in React Hooks?
body: <p>These are in the parent component...</p>
  
  <pre><code>   const [setQuantity, quantity] = useState(1);
  
     const handleSetQuantity = e =&gt; {
        console.log(e.target.value);
        console.log("TEST");
  
        setQuantity(e.target.value);
      };
  </code></pre>
  
  <p>And I am passing it to child component like so:</p>
  
  <pre><code>&lt;SomeChildComponent
      setQuantity={e =&gt; handleSetQuantity(e)}
      quantity={quantity}
  /&gt;
  </code></pre>
  
  <p>Inside the :</p>
  
  <pre><code>&lt;select
      onChange={e =&gt; props.setQuantity(e)}
      value={props.quantity}
      &gt;
      &lt;option value={1}&gt;1&lt;/option&gt;
      &lt;option value={2}&gt;2&lt;/option&gt;
      &lt;option value={3}&gt;3&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>I am able to access the function from child since the "TEST" log appears. However it tells me that:</p>
  
  <pre><code>Uncaught TypeError: setQuantity is not a function
  </code></pre>
  
  <p>What am I doing wrong? And if so, what is the right way to change parent state from action triggered by child component?</p>