Question · Vue.js course · Module 4: Computed & Watch

Watch on getter function

Why do we use a getter function in watch (e.g., () => obj.property)?

Answer options

  • To observe a single property of a reactive object
  • It is required by TypeScript
  • A getter is faster than a direct reference
  • Getters should not be used in watch

You can check the correct answer by solving this task in the CodeWorlds game.