vue-lynx / reactive

Function: reactive()

function reactive<T>(target): Reactive<T>

Returns a reactive proxy of the object.

The reactive conversion is "deep": it affects all nested properties. A reactive object also deeply unwraps any properties that are refs while maintaining reactivity.

Type Parameters

Type Parameter
T extends object

Parameters

ParameterTypeDescription
targetTThe source object.

Returns

Reactive<T>

Example

const obj = reactive({ count: 0 })

See

https://vuejs.org/api/reactivity-core.html#reactive

Defined in

node_modules/.pnpm/@vue+reactivity@3.5.30/node_modules/@vue/reactivity/dist/reactivity.d.ts:44