You are building a MobX store for a to-do application. Whenever a task is marked as completed, you want to automatically update the total count of completed tasks. Which MobX feature would be best suited for this?

  • Actions
  • Computed Property
  • Observables
  • Reactions
In this scenario, a Computed Property in MobX would be best suited. Computed properties automatically update whenever the observable data they depend on changes. By defining a computed property for the total count of completed tasks, you ensure it updates automatically when the completion status of tasks changes. It's an efficient way to derive data from observables.
Add your answer
Loading...

Leave a comment

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