In MobX, which decorator is used to mark a property as observable?
- @component
- @observable
- @state
- @watch
In MobX, the @observable decorator is used to mark a property as observable. When a property is marked as observable, MobX can track changes to it and automatically update any components that depend on it when it changes. This is a key feature for reactive state management in MobX.
Loading...
Related Quiz
- When using React Transition Group, which component is useful for animating the presence of a component over time, especially when it's being added or removed?
- What is the difference between setState and replaceState methods?
- Imagine you're building a small-sized application with minimal state logic and you want to avoid adding additional libraries. Which state management approach would you likely consider?
- What are React Mixins?
- Your application has users worldwide, and you need to provide social media logins, SSO, and multi-factor authentication. Which service would cater to all these needs?