You may not have known this, but you can easily watch nested values directly, just by using quotes:
watch: { '$route.query.id'() { // ... } }
This is really useful for working with deeply nested objects!
Build Vue 3's reactivity system from scratch in this free 7-day email course. Learn how ref(), reactive(), and computed() actually work by implementing them yourself.
ref()
reactive()
computed()
Join 13,567+ Vue developers already learning with Michael