Answers for "vue composition api 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 composition watch

// firstArgument is that what we watch
// secondArgument is the Function what we want to call

watch(firstArgument, secondArgument 
=> console.log(secondArgument));
Posted by: Guest on December-03-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language