useReactive<T>(initialValue: T | (() => T)): UnwrapNestedRefs<T>
The hook version of reactive from @vue/reactivity.
In addition to values accepted by reactive, you can also pass an initializer function returning the value.
This hook version allows the reactive object to be created when the component first renders, then cached for future
re-renders.
If you pass in an initializer function, it will only be called on first render.
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.
The hook version of
reactive
from@vue/reactivity
. In addition to values accepted byreactive
, you can also pass an initializer function returning the value.This hook version allows the reactive object to be created when the component first renders, then cached for future re-renders. If you pass in an initializer function, it will only be called on first render.
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.
Example
Example
See
https://vuejs.org/api/reactivity-core.html#reactive