[Vuejs]-Not able to push new object in array of objects

0👍

Dispatch the data.products

getAllProducts() {
axios .get(http://localhost:3000/products)
.then((data) => {
console.log(typeof data)
console.log(data)
this.$store.dispatch("addAllProducts", data.products);
});.

Leave a comment