Question 12
Consider the following Vue component:
Vue.component('search-component', { data() { return { searchQuery: '' } }, watch: { searchQuery(newQuery, oldQuery) { this.fetchResults(newQuery) } }, methods: { fetchResults(query) { // Fetch search results } }})Which of the following statements is true?
The fetchResults method will be called immediately when the component is created.
The fetchResults method will be called only when searchQuery changes.
The watch property can detect changes even if the new value is the same as the old value.
All of these.