title: How to make multiple Axios requests using a dynamic array of links in Javascript?
body: <p><code>linksArray</code> is an array with six links.</p>
  
  <p>I want to use this array to perform (6) get requests. Then, I want to take the response and <code>setState</code> after the response is mapped through to get the results I want.</p>
  
  <p>Any help here?</p>
  
  <pre><code>getGistsDescriptions = () =&gt; {
  let promiseArray = linksArray.map((url) =&gt; { return axios.get(url)});
  
  axios.all(promiseArray)
       .then(axios.spread((...res) =&gt; {
         console.log(...res);
  
        /*let temp = res.map((element) =&gt; {
          return element.data;
        });*/
  
         //this.setState({ gistsDescriptions: temp });
       }))
       .catch((err) =&gt; {
      console.log(err);
    });
   }
  </code></pre>
  
  <p>I also tried this:</p>
  
  <pre><code>getGistsDescriptions = () =&gt; {
  let promiseArray = linksArray.map((url) =&gt; { return axios.get(url)});
  
  axios.all(promiseArray)
       .then((results) =&gt; {
         console.log(results);
  
        /*let temp = results.map((element) =&gt; {
          return element.data;
        });*/
  
         //this.setState({ gistsDescriptions: temp });
       })
       .catch((err) =&gt; {
      console.log(err);
    });
  }
  </code></pre>