0👍
You can use Promise.all
to combine all your result.
const allFetches = acoes.map(
data => fetch(...)
.then(response => response.json()
)
Promise.all(allFetches)
.flatMap(result => result)
.then(posts => {
this.posts = posts;
});
- [Vuejs]-VueX actions not mapping. Message – [TypeError: Cannot read property 'dispatch' of undefined]
- [Vuejs]-Vue – Importing external JSON without reloading
Source:stackexchange.com