Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

triggerRef does not activate watch callbacks on shallow refs #1736

Closed
danielh57 opened this issue Jul 30, 2020 · 0 comments
Closed

triggerRef does not activate watch callbacks on shallow refs #1736

danielh57 opened this issue Jul 30, 2020 · 0 comments

Comments

@danielh57
Copy link

Version

3.0.0-rc.5

Reproduction link

https://github.com/hd721/vue3-triggerref/blob/master/src/App.vue#L12

Steps to reproduce

  1. Create a shallow ref.
  2. Use watch (not watchEffect) to add a side effect when the ref changes.
  3. Update a nested property of the ref's inner value.
  4. 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.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant