For properties that should recompute only when the data they depend upon changes, you use the MobX ________ decorator.
- @action
- @autorun
- @computed
- @observer
To make properties recompute only when the data they depend upon changes, you use the @computed decorator in MobX. This decorator creates a computed property, which automatically updates itself when the observed data changes. The other decorators (@action, @observer, @autorun) serve different purposes and do not create computed properties.
Loading...
Related Quiz
- How does React handle events differently from plain JavaScript, especially considering browser compatibility issues?
- If you want to group multiple dynamic imports together in Webpack, you can use the /* webpackChunkName: "name" */ directive to assign them to the same ________.
- While HOCs and Render Props patterns are powerful for reusing component logic, they can introduce an undesired side effect called ________.
- What is Jest?
- What is React Dev Tools?