Avoid deep reactivity. Treat all reactive state as immutable — never mutate objects in-place, always produce new references.
-
shallowRefoverreffor complex objects.ref()wraps entire tree in deep proxies, hiding accidental mutations. -
immerfor complex mutations. When nested spreads become unreadable, useproduce. SeePlAdvancedFilter.vuefor pattern. -
No
defineModelfor objects. It creates a writable ref allowingmodel.value.prop = x— silent prop mutation. Use explicitprops+emit("update:...")or callback props instead. -
No
v-modelon nested computed properties.v-model="computed.nested"bypasses the computed setter. Use:model-value+@update:model-value. -
Computed getters must not return shared references. If source is already in the right shape, return a copy, not the same object.
-
:model-value+@update:model-valueoverv-modelfor complex objects — makes data flow explicit.