I have this Vue.js code:
new Vue({
data:{
myValue:\'x\',
myOtherValue:\'y\'
},
computed: {
myComputed: myFunction(){
ret
From the docs it reads that: Computed properties are cached, and only re-computed on reactive dependency changes. However the following fiddle shows something a bit different.
From the fiddle if you set the flag to 2, the computed property will be re-evaluated and executed if you change myOtherValue, however this will not happen if the flag is set to 1. I think it keeps track of your if conditions.
In the docs usually you can find links to the relevant source code. Here is the code for computed properties: