Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

91
Views
Hierarchical logging of MobX derivations/computeds

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.

Example: enter image description here

(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?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!