Module

x/vue3_reactivity/mod.ts>reactive

vue3_reactivity is forck by @vue/reactivity for deno.
Latest
function reactive
import { reactive } from "https://dotland.deno.dev/x/vue3_reactivity@v1.0.0/mod.ts";

Creates a reactive copy of the original object.

The reactive conversion is "deep"—it affects all nested properties. In the ES2015 Proxy based implementation, the returned proxy is not equal to the original object. It is recommended to work exclusively with the reactive proxy and avoid relying on the original object.

A reactive object also automatically unwraps refs contained in it, so you don't need to use .value when accessing and mutating their value:

const count = ref(0)
const obj = reactive({
  count
})

obj.count++
obj.count // -> 1
count.value // -> 1

Type Parameters

T extends object

Parameters

target: T