I have a component with the following hash
{
computed: {
isUserID: {
get: function(){
return this.userId?
}
}
}
Should I be watching isUserID
or userId
for changes? Can you watch computed properties?
I have a component with the following hash
{
computed: {
isUserID: {
get: function(){
return this.userId?
}
}
}
Should I be watching isUserID
or userId
for changes? Can you watch computed properties?
This way we can watch over the computed property if it is changed we get notified on the console.
Yes, you can setup watcher on computed property, see the fiddle.
Following is the code to set watch on computed property: