Answer the question
In order to leave comments, you need to log in
How to determine that all asynchronous operations have completed?
Hello.
There is an async method in which, first, for an array of data, a get request is made for each element of this array, then it resolves
const responses = await Promise.all(responsePromises);
items.forEach((item, itemIndex) => {
responses.forEach((res, resindex) => {
if (itemIndex === resIndex) {
axios.post(res.post_url, item, config);
}
});
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question