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

When to use computed vs watch

When is it better to use computed instead of watch?

Answer options

  • When you want to execute a side effect (e.g., API call)
  • When the value depends on reactive data and should be cached
  • When you need access to oldValue
  • Always - watch is deprecated

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