Answer the question
In order to leave comments, you need to log in
Vuex: Getters - real-time update. state - new Date()?
Hello!
Briefly: how to make the "new Date()" state getter update in real-time?
There is the following Vuex store:
state: {
datetime: new Date(),
},
getters: {
getDatetime: state => state.datetime,
}
computed: {
getDatetime() {return this.$store.getters.getDatetime;}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question