We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
the section proxy vs. original identity states that a proxy is not identical to the original object it wraps.
I assume proxy means the use of reactive(myObject) or ref(myValue).
proxy
reactive(myObject)
ref(myValue)
Indeed,
let data = {myObject:{myNumber:3}} let reactiveData = reactive(newData); data === reactiveData; // → false
And it also applies to nested objects
data.myObject === reactiveData.myObject // → false
However, what the guide does not mention is that this does not apply to the properties as long as they are not objects themselves
data.myObject.myNumber === reactiveData.myObject.myNumber // → true
This also applies to the example which gives the caveat for the strong-comparison array methods like .find
.find
let myArray = [1,2,3,4] let myReactiveArray = reactive(myArray); myReactiveArray.find(number => number === 2) === myArray[1] //→ true
My suggestions would be:
The text was updated successfully, but these errors were encountered:
I'm currently working on some other changes to this page, including #524, so I'll try to address some of these points as part of that.
Sorry, something went wrong.
skirtles-code
Successfully merging a pull request may close this issue.
the section proxy vs. original identity states that a proxy is not identical to the original object it wraps.
I assume
proxy
means the use ofreactive(myObject)
orref(myValue)
.Indeed,
And it also applies to nested objects
However, what the guide does not mention is that this does not apply to the properties as long as they are not objects themselves
This also applies to the example which gives the caveat for the strong-comparison array methods like
.find
My suggestions would be:
proxy
in vue can mean using the implicitly proxied values in the method’s API or ref/reactive in the composition API.The text was updated successfully, but these errors were encountered: