title: how to output value from async method
body: <p>I want to create a async method that returns an image path like this:</p>
  <pre><code>const renderMasterThumb = async (masterAssetId) =&gt; {
      const masterAsset = await getAssetByIdAsync(masterAssetId);
      const path = masterAsset.path;
      return path;
    };
  </code></pre>
  <p>then I call the method like this:</p>
  <pre><code>&lt;img
      src={`images/${(async () =&gt; {
      await getAssetByIdAsync(collection.masterAssetId);
      })()}`}
      alt=&quot;master thumb&quot;
  /&gt;
  </code></pre>
  <p>However instead of the image path I get a Promise object:</p>
  <pre><code>&lt;img src=&quot;images/[object Promise]&quot; alt=&quot;master thumb&quot;&gt;
  </code></pre>
  <p>Does someone know how I can output the value (eg 'bart.jpg') from calling an async method?</p>
  <p>thanks for your help,</p>
  <p>Anthony</p>