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
Add a remark about watching objects/array refs #2454
Comments
Absolutely. There is inconsistent terminology usage. The deep watchers section states the following:
At the same time, the
But actually, when you call So this needs to be clarified, as the current phrasing is misleading. |
From the docs at least for me it's not obvious that watching a ref is actually shallow watching its value only.
The problem that we know that an object/array ref makes the object/array accessed through the ref's value reactive.
So intuitively it could seem that watching an object/array ref is deep like watching a reactive variable, but it's not.
I think a remark about this case should be added in the docs, otherwise I see periodically that kind of questions on the stackoverflow:
https://stackoverflow.com/questions/76786334/cannot-watch-an-array-ref-in-vue-3/76786671
The text was updated successfully, but these errors were encountered: