I am having a reactivity gotcha with Vue Vuex. I'm using an open source countdown timer. In the code below item.dueDate reacts properly when the active item changes in the $store, (the new date shows on the page), however, the data passed to Countdown doesn't update. It holds the old value. It does work the first time, though. So, it's not updating. Why not? Thanks!!
<template>
<v-layout>
<v-flex>
<v-card v-if="item">
<v-card-text>
<h3>Countdown {{item.name}} - {{item.dueDate}}</h3>
</v-card-text>
<Countdown v-if="item.dueDate" :deadline="item.dueDate"></Countdown>
</v-card>
</v-flex>
</v-layout>
</template>
<script>
import Countdown from 'vuejs-countdown'
export default {
components: { Countdown },
computed: {
activeItem(){
return this.$store.getters.activeItem
},
item(){
return this.$store.getters.loadedItem(this.activeItem)
}
}
}
</script>