title: How to make a loop request with React using Axios?
body: <p>How can I loop an Axios request to fill an array of objects?</p>
  
  <p>I'm trying to create a web interface that consumes a Star Wars API called swapi. It can be accessed in this link: <code>https://swapi.co/</code></p>
  
  <p>I can search for people, starships, planets, species and films. So, for instance, if I want to search for Luke Skywalker, I add <code>/api/people/1/</code> like <code>https://swapi.co/api/people/1/</code> .</p>
  
  <p>So far so good.</p>
  
  <p>Now, if I want every Star Wars characters, I simply remove the number 1, the url will be <code>https://swapi.co/api/people/</code> and I will have the first ten characters out of 87, I think.</p>
  
  <p>But I don't want 10. I want all of them... That makes me do a multiple request to grab all characters data. The problem is, if I use a loop to make the requests, let's say a while loop, it finishes all the search before the very first request brings the data to my code to treat it.</p>
  
  <p>I'm using a global state through Redux and I'm calling Redux Thunk via <code>componentDidMount()</code>. It works fine, actually and the first ten characters data are retrieved and they fill my render method in React. But how can I make multiple requests without having a loop that ends up before those requests?</p>