Detect when some of object properties are changes
Closed this issue · 0 comments
forceuser commented
For example to make reaction than prints JSON from object, to trigger reaction when any change happens
Make special property on observable object, call to that property will signal that we need detect any changes
Example
activeData.setOptions({iwholeObjectObserveKey: "$$watch"});
const a = activeData.makeObservable({});
activeData.makeReaction(() => console.log(a.$$watch));
a.prop1 = 1; // will trigger reaction
a.prop2 = 2; // will also trigger reaction