1
Your dateUpdate
computed property’s value is what you should watch for, not the date
prop. Currently, you’re not changing the value of the prop date
, you’re just taking a date
prop in the child component, and then inside of the dateUpdate
computed property you are using the date
to return a different value. The name of this different value is dateUpdate
, and if you want to see the value change, you should put your watch on this computed property.
child
props: {
date: String,
},
watch: {
dateUpdate(value){
console.log(value)
}
},
computed: {
dateUpdate(){
...
},
}```
Source:stackexchange.com