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
In some cases, the app developer may know that they don't need deep reactivity. To wring out maximum performance, it would be kind to offer a way to opt out of that behaviour.
Describe the proposed solution
letobject=$state.raw({count: 0});// has no effect! `object` properties are not reactiveobject.count+=1;// works as expectedobject={ ...object,count: object.count+1};
We would need to add a Symbol to the object passed in to $state.raw, so that it isn't later made reactive if someone does this:
Describe the problem
In some cases, the app developer may know that they don't need deep reactivity. To wring out maximum performance, it would be kind to offer a way to opt out of that behaviour.
Describe the proposed solution
We would need to add a
Symbol
to the object passed in to$state.raw
, so that it isn't later made reactive if someone does this:Alternatives considered
$state.freeze
,$state.shallow
, etcImportance
nice to have
The text was updated successfully, but these errors were encountered: