vuex state undefined vue 3-Vuex Doesn't show state -quasar-just add store-state.store.propertystate
this error is common when you are working with vue 3 composition api. make sure import vuex, and print the state within computed, the solution is put "state.store" instead just put store.userDetails. good luck!!
import { useStore } from "vuex";
...
setup(){
const store = useStore();
return{
userDetails: computed(() => {
console.log(store.state.store.userDetails);
return store.state.store.userDetails;
}),
}
}
Comentarios
Publicar un comentario