I have a method sending API request in loop of list, after the loop I would like to update view on the screen, but this update is not waiting for the end of the last post. Any suggestions?
async doPost(name) {
return await axios.post("/api/data/" + name);
}
async doAction(dataList) {
dataList.map(dt=> {
const actionResponse = this.doPost(dt.name);
if (actionResponse) {
console.log("response: " + actionResponse);
this.updateNotify(dt);
}
});
this.UpdateView();
};