Vue · Middle · Question 54 of 75

How do you watch several sources with one callback?

watch([page, () => filters.status], ([newPage, newStatus]) => {
  load(newPage, newStatus)
})

Explanation

Sources can be refs, reactive objects or getter functions. A property of a reactive object must be wrapped in a getter.

Further reading

Problem with a question

Vue · Middle · question 54

Test yourself

Take the Vue · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz