title: How to use AsyncStorage in App.tsx so that commands are fired in correct order
body: <p>I'm struggling for a long time with the <code>AsyncStorage</code> and finding a way to use it in my project. My issue is that I'm not able to fire it in the right time. In the following example I need the token to be filled before the following command (here for demonstration I use <code>console.log(2)</code>) is fired.</p>
  <p>Also, to mention, this is the App.tsx, so I'm not able to use <code>useState</code> or <code>componentDidMount</code> which would solve my issue.</p>
  <p>Example:</p>
  <pre><code>console.log(1)
  const token = AsyncStorage.getItem(AUTH_TOKEN).then((token) =&gt; {
    console.log(token)
    if (token != null) {
      return token
    }
  });
  console.log(2)
  </code></pre>
  <p>So what I would like to have is:</p>
  <pre><code>1
  ojh324rfoj32n4t243to2n
  2
  </code></pre>
  <p>but I get:</p>
  <pre><code>1
  2
  ojh324rfoj32n4t243to2n
  </code></pre>
  <p>How to control the <code>async await</code> so it is safe to use the <code>token</code> variable?</p>
  <p>I also would <strong>not</strong> like to use the <code>callback</code> function, as I would then need to put everything in there, which I think would not work without issues.</p>
  <p>Future usage (pseudo code):</p>
  <pre><code>const token = AsyncStorage.getItem(AUTH_TOKEN).then((token) =&gt; {
    console.log(token)
    if (token != null) {
      return token
    }
  });
  use(token)...
  </code></pre>