there is a http request in a.vue. After the response, this.$store.commit ("userInfo", userInfo);
,
get the updated data through computed on the b.vue page
userInfo(){
return this.$store.state.userInfo
},
there is a method in the b.vue page that needs to obtain this data: this.userInfo
,
when the page refresh is refreshed, the page request in the a.vue page may not be completed, and the b.vue page is about to obtain data, resulting in undefined problems.
how should this problem be solved?