I wanted to watch URL query changes with watch in Nuxt3, so I wrote the following code, but the watch did not work when the URL query changed.

<script lang="ts" setup>
const route = useRoute()

watch(
  route,
  () => {
    console.log(route['query'])
  }
)
</script>

So I referenced the following article.

https://qiita.com/YumaInaura/items/9c86ed91d56402e816db

By changing the code to the following, the watch worked in response to URL query changes.

<script lang="ts" setup>
const route = useRoute()

watch(
  () => route.query,
  () => {
    console.log(route['query'])
  }
)
</script>

There are still many things I don’t fully understand, but I hope this is helpful to others.