Shallow version of ().
Unlike (), there is no deep conversion: only root-level properties are reactive for a shallow reactive object. Property values are stored and exposed as-is - this also means properties with ref values will not be automatically unwrapped.
const state = shallowReactive({ foo: 1, nested: { bar: 2 }})// mutating state's own properties is reactivestate.foo++// ...but does not convert nested objectsisReactive(state.nested) // false// NOT reactivestate.nested.bar++
https://vuejs.org/api/reactivity-advanced.html#shallowreactive
The source object.
Generated using TypeDoc
Shallow version of ().
Unlike (), there is no deep conversion: only root-level properties are reactive for a shallow reactive object. Property values are stored and exposed as-is - this also means properties with ref values will not be automatically unwrapped.
Example
See
https://vuejs.org/api/reactivity-advanced.html#shallowreactive