title: Using useState hooks within an async callback
body: <p>I'm running an async operation with a callback (ipfs in this case, but it probably doesn't matter), and I'm trying to set state using hooks within that callback. But the code isn't operating...do I need to use useEffect here maybe?</p>
  
  <pre><code>await ipfs.add(buffer, (err, ipfsHash) =&gt; {
        setIpfsHash(ipfsHash);
        console.log("in ipfs - ipfshash", ipfsHash);
  });
  </code></pre>
  
  <p>setIpfsHash is blocking the inner code. The console.log does not run</p>