title: How to await multiple async await requests in React
body: <p>I am wanting to do something like the following in a React component:</p>
  
  <pre><code>const someArray = [/*stuff*/]
  const results = []
  someArray.forEach(async item =&gt; {
  
    const result = await someAsyncFunction(item)
    results.push(result)
  })
  </code></pre>
  
  <p>How can I know when all the results have returned then do something?</p>
  
  <p>If I was using $q, in AngularJS, I could do</p>
  
  <pre><code>var results = []
  someArray.forEach(function(item) {
    var result = someAsyncFunctionThatReturnsAPromise(item);
    results.push(result);
  });
  
  $q.all(results).then(function() {
    // do something
  });
  </code></pre>