createRef
createRef
deep パラメータに応じて deepRef または shallowRef を返します。
使用法
import { createRef } from '@vueuse/core'
import { isShallow, ref } from 'vue'
const initialData = 1
const shallowData = createRef(initialData)
const deepData = createRef(initialData, true)
isShallow(shallowData) // true
isShallow(deepData) // false
© 2019–PRESENT Anthony Fu https://github.com/antfu
※このページは Nuxt.js 公式ドキュメントの翻訳ページです。
公式ドキュメントの該当ページはこちら:
#