use methods in vue3 composition api code example
Example 1: vue 3 composition api watch
// directly watching a ref
const selected = ref(props.selected)
watch(selected, (selection, prevSelection) => {
/* ... */
})
Example 2: fetch composition API in Vue3
# http requests using Fetcht api in Vue 3 explained (see videos below)
https://www.youtube.com/watch?v=-Aoyja_BjZY
https://www.youtube.com/watch?v=LvOYCjpMQ10