Hi there, just wondering if there is a specific way of detecting when a certain piece of data changes in ViewModel? I thought I saw some mention of a changed attribute/function at some point?
My use case is trying to change a value of a variable inside an autorun block (unless it was that particular variable that has just been updated)
This is typically a code smell. But if you really must, and sometimes you do, any reactive data source inside the autorun will trigger the autorun to compute, along with the rest of the code you put there.
const myVar = new ReactiveVar();
instance.autorun(() => {
console.log('myVar changed', myVar.get();
});
myVar.set('foo'); // <-- this will trigger the autorun to run