[Vuejs]-Vue computed not firing when vuex state changes

2👍

You don’t have any this.datas property in the code shown.

It is also important how do use the computed. It runs the computed method only if there is some call of computed value. You can not expect method to be called if you do not use this.data property in your component.

0👍

U can just use mapState instead, if u not gonna process your studyData anymore and save your time writing this.$store.state.login.studyData

computed: {
…mapState([
"studyData",
"studyData2",
]),
}

Leave a comment