[Vuejs]-Vue Reading in parallel in a loop

0👍

hope it will resolve your issues. i did not test, just writing code here directly.

    // set requests
    let allRequests = []
    //you can use other loop based on your decession
    this.userIds.forEach(id => { allRequests.push(axios.get(`your_url\${id}`)) })
    
    // you can use await it is based on you requirement
    axios.all(allRequests).then(axios.spread((...responses) => {
      //make your map here using responses
    })).catch(errors => {
      // react on errors.
    })

you can check this reference

Leave a comment