Answers for "vue3 watch"

7

vue 3 composition api watch

// directly watching a ref

const selected = ref(props.selected)

watch(selected, (selection, prevSelection) => { 
   /* ... */ 
})
Posted by: Guest on August-25-2020
0

vue watch

watch: {
  // whenever question changes, this function will run
  question(newQuestion, oldQuestion) {
    // your code
  }
},
Posted by: Guest on October-20-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language