title: How to fire multiple API calls asynchronously at the same time?
body: <p>Basically I have a screen that calls multiple APIs at <code>componentDidMount</code>, and each and every API will fire a network request along with a callback, something as below</p>
  
  <pre class="lang-js prettyprint-override"><code>componentDidMount() {
      new APIManager.fetchBooks(this.handleBooks);
      new APIManager.fetchAuthor(this.handleAuthor);
      new APIManager.fetchShops(this.handleShops);
  }
  
  ...
  
  handleBooks = (result) =&gt; {
    this.setState({ books: result });
  }
  ...
  </code></pre>
  
  <p>And basically all the <code>fetch</code> methods works pretty similarly, it accepts a single parameter which is a callback from the component, pseudocode as below</p>
  
  <pre class="lang-js prettyprint-override"><code>export async function fetchBooks(callback) {
    const result = await callNetworkAPI();
  
    callback(result);
  }
  </code></pre>
  
  <p>This was working fine on both Android and iOS at react-native v0.53 but it's not working anymore at v0.59.10 on iOS.</p>
  
  <p>What's happening now is that, <code>fetchBooks</code>, <code>fetchAuthor</code> and <code>fetchShops</code> will all still be triggered but <code>this.handleBooks</code>, <code>this.handleAuthor</code> will no longer be triggered. It's like they lost their cursor.</p>
  
  <p>I've made it work such that all API calls has to be using <code>await</code>, something as below</p>
  
  <pre class="lang-js prettyprint-override"><code>async componentDidMount() {
    const books = await APIManager.fetchBooks();
    const authors = await APIManager.fetchAuthor();
    const shops = await APIManager.fetchShops();
  
  
    this.handleBooks(books);
    this.handleAuthors(authors);
    this.handleShops(shops);
  }
  </code></pre>
  
  <p>And of course updates to my <code>APIManager</code> as below:</p>
  
  <pre class="lang-js prettyprint-override"><code>export async function fetchBooks() {
    const result = await callNetworkAPI();
  
    return result;
  }
  </code></pre>
  
  <p>Its working fine, but all 3 API calls cannot be asynchronously anymore because I made it await for the previous API call before proceeding. I'm wondering if there's a better way to handle my problem? Or I'm totally on the right track?</p>