title: How to use Promise.all to handle thousands of request
body: <p>In my React app I have a component that send request to an online service that is capable to handle 50 requests max. I got a new request now to execute 7000 MAC’s.</p>
  <pre><code>function App() {
  const [data, setData] = useState([]);
  
  useEffect(() =&gt; {
       const fetchData = async () =&gt; {
          await axios.all([
               axios.get(&quot;/ipdn/&lt;MAC ADDRESS&gt;&quot;, { timeout: 10000 }),
               axios.get(&quot;/ipdn/&lt;MAC ADDRESS&gt;&quot;, { timeout: 10000 })
         // Adding all the mac address ....... 
          ]).then((responseArr) =&gt; {
              setData(responseArr)
          });
       };
      fetchData();
  }, []);
  </code></pre>
  <p>I would like to extend the fetchData function so basically it will send only 50 IP’s and will wait till iteration is complete.</p>
  <p>When the iteration is complete then the next 50 will be executed.</p>
  <p>Thank you</p>