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
however the data property is part of a reactive object, and when you set that property
with a new shallowReactive object, vue removed the shallow proxy, and made it part of the reactive object.
your expectation to respect shallowReactive, will actually violate the reactive object principles
where *everything is suppose to be deeply reactive. with some exceptions for example objects marked as raw
my recommendation will be not to mix the two.
but if you really need this use case, you can "protect" it with a ref
Version
3.2.26
Reproduction link
SFC Playground
Steps to reproduce
What is expected?
I expect the values of the
state.data
array to always be non-reactiveWhat is actually happening?
Values inside the array are not reactive only the first time. When a new shallow reactive array is assigned, then its values become reactive.
The text was updated successfully, but these errors were encountered: