Skip to content

Watchers inside setup functions don't get invoked #1792

Discussion options

You must be logged in to vote

You need a deep watcher for arrays (https://vuejs.org/guide/essentials/watchers.html). You will notice the same happens in plain vue

BTW the second watcher should be:

watch(() => cart.rawItems, ..., { deep: true })

There is a small section explaining this in the same doc page

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by posva
Comment options

You must be logged in to vote
1 reply
@posva
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1791 on November 10, 2022 08:15.