-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
When clear a reactive array object in effect function, the array.length
is not 0
, all ways has a element in it.
#6018
Comments
I got exactly the same problem. |
This isn't really an edge-case. There should be a warning somewhere in the docs, that you should not use And that The JSBench example here is 10 million times slower with Proxy, on my machine: #3541 (comment) |
Fixed by #5912. |
Vue version
3.2.22
Link to minimal reproduction
#6017
Steps to reproduce
just copy the code to HTML file, load page in browser.
store.value.splice(0)
trigger effect callback run again, but in the effect callback,store.value.length
is not0
.Did I use
@vue/reactivity
it in the right way ???What is expected?
When clear
store.value
, thestore.value.length=0
.What is actually happening?
Clear reactive array
store
, but thestore.value.length=1
, not0
.System Info
Any additional comments?
Maybe I use it in the wrong way.
The text was updated successfully, but these errors were encountered: