I've come across a situation in my Vuex action where the console.log() is displaying an undefined
output. Here's the method in my Vuex action:
const actions = {
async fetchByQuery({ commit, title }) {
console.log(title);
//other codes
},
};
methods: {
...mapActions(["fetchByQuery"]),
getData(title) {
console.log("teacher");
this.fetchByQuery(title);
}
}
Can anyone point out what might be missing or causing the undefined
output in the console?