I have a complex network of derivations that runs great (thanks MobX!) but I'd like to log value changes with respect to the upstream values that caused the change, i.e. hierarchically or as a tree.
(Note: In the diagram the change to A could cause X to change but did not.)
(In the event that a computed would have been triggered by multiple changes, it'd be ideal to treat it has having been caused by the first item touched in the graph.)
I can create reactions for each change, but of course they will all run at the end and without a guaranteed order. It smells like I might be able to assemble the log tree after the fact if I keep track of the computed's debug names and then do some kind of dependency lookup in later to see if a prior change is in the log, in which case I could append the new log entry to that previous entry. But that sounds kinda gross and brittle...
Are there any features in mobx that'd make this problem go away or simplify it?