Here how are my datas in the store :
Here my code :
fetchNotifications() {
let notifications = {}
axios.get('/api/unreadNotifications')
.then(response => {
notifications = response.data
if(notifications) {
this.$store.commit("updateNotifications", notifications)
}
})
.catch(error => {
console.log()
});
},
checkDisplayQuestionnaire() {
console.log(this.$store.state.notifications)
},
If i console.log(response.data)
in the .then
of fetchNotifications()
, datas are like this :
I tried to use JSON.parse(JSON.stringify(this.$store.state.notifications))
without success.
Anyone have an idea of the problem ? Thanks you.
question from:
https://stackoverflow.com/questions/65643257/vue-js-console-logging-return-an-observer 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…