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."
Loading...
Related Quiz
- What is the use of react-dom package?
- While HOCs and Render Props patterns are powerful for reusing component logic, they can introduce an undesired side effect called ________.
- In Immutable.js, to apply a function to each item in a List and return a new List, you would use the ________ method.
- What are loadable components?
- What are the sources used for introducing hooks?