Skip to content

reactiveComputed

类别
导出大小
280 B
最近修改
2 days ago

计算后的响应式对象。与 computed 返回一个 ref 不同,reactiveComputed 返回一个响应式对象。

🌐 Computed reactive object. Instead of returning a ref that computed does, reactiveComputed returns a reactive object.

用法

🌐 Usage

ts
import { 
reactiveComputed
} from '@vueuse/core'
const
state
=
reactiveComputed
(() => {
return {
foo
: 'bar',
bar
: 'baz',
} })
state
.
bar
// 'baz'