API to track dependencies #4568
andres-kovalev
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
At the moment we have
createAtom()
API to build custom observables. It would be nice to have something similar to track dependencies to build custom computeds/reactions. There is acomputed()
method to create computed from an expression (function), but it only requires to track dependencies inside a certain function call when sometimes it's essential to track dependencies (and react) across several execution contexts. For instance, when the total computation is divided in several separate independent steps for optimisation (e.g. fibers) or the flow consist of several consecutive steps (e.g. async flow).It would be nice to have an abstraction to collect dependencies and react on updates:
WDYT?
Beta Was this translation helpful? Give feedback.
All reactions