reactiveComputed
reactiveComputed
計算されたリアクティブオブジェクト。computed が ref を返す代わりに、reactiveComputed はリアクティブオブジェクトを返します。
使用法
import { reactiveComputed } from '@vueuse/core'
const state = reactiveComputed(() => {
return {
foo: 'bar',
bar: 'baz',
}
})
state.bar // 'baz'
© 2019–PRESENT Anthony Fu https://github.com/antfu
※このページは Nuxt.js 公式ドキュメントの翻訳ページです。
公式ドキュメントの該当ページはこちら:
#