mobxjs / mobx.dart

MobX for the Dart language. Hassle-free, reactive state-management for your Dart and Flutter apps.
https://mobx.netlify.app
MIT License
2.39k stars 310 forks source link

feat: add requiresReaction to `Computed` #974

Open amondnet opened 8 months ago

amondnet commented 8 months ago

https://mobx.js.org/computeds.html#requiresreaction

It is recommended to set this one to true on very expensive computed values. If you try to read its value outside of the reactive context, in which case it might not be cached, it will cause the computed to throw instead of doing an expensive re-evalution.