Which MobX utility can be used to create a custom reaction based on observable changes?

  • @observer
  • autorun
  • computed
  • when
The MobX utility "when" can be used to create a custom reaction based on observable changes. "when" allows you to create a reaction that runs only when a specified condition is met, which can be useful for handling specific cases or side effects based on changes in observables. This utility provides fine-grained control over when reactions are triggered, beyond the automatic reactions provided by "autorun" or "computed."
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *