vue-create-ref
v1.0.0
Published
Vue 3 factory returning shallowRef (default) or deepRef
Maintainers
Readme
Installation
npm install vue-create-refUsage
import { createRef } from 'vue-create-ref'
import { isShallow } from 'vue'
const initialData = 1
// Create shallow ref (default)
const shallowData = createRef(initialData)
// Create deep ref
const deepData = createRef(initialData, true)
console.log(isShallow(shallowData)) // true
console.log(isShallow(deepData)) // falseLicense
MIT
Extracted from VueUse for standalone use.
