You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use watch (not watchEffect) to add a side effect when the ref changes.
Update a nested property of the ref's inner value.
Use triggerRef to notify Vue that the ref has been modified.
What is expected?
The watch callback is called.
What is actually happening?
The watch callback is not called.
This code is adapted from the Vue 3 documentation, which uses watchEffect and works correctly. I couldn't find any mention of the behavior being different for watch.
The text was updated successfully, but these errors were encountered:
Version
3.0.0-rc.5
Reproduction link
https://github.com/hd721/vue3-triggerref/blob/master/src/App.vue#L12
Steps to reproduce
watch
(notwatchEffect
) to add a side effect when the ref changes.triggerRef
to notify Vue that the ref has been modified.What is expected?
The
watch
callback is called.What is actually happening?
The
watch
callback is not called.This code is adapted from the Vue 3 documentation, which uses
watchEffect
and works correctly. I couldn't find any mention of the behavior being different forwatch
.The text was updated successfully, but these errors were encountered: