watch — explicit. watchSyncEffect — synchronous.
watch:
watchSyncEffect:
1<script setup>2import { ref, watch, watchSyncEffect } from "vue"34const count = ref(0)56// Async7watch(count, (val) => console.log(val))89// Sync10watchSyncEffect(() => {11 document.title = `Count: ${count.value}`12})13</script>
Key: watch for async, watchSyncEffect for sync.