vue-sync-refs
v1.0.0
Published
Vue 3 utility to keep multiple refs synchronized bidirectionally
Maintainers
Readme
Installation
npm install vue-sync-refsUsage
import { syncRefs } from 'vue-sync-refs'
import { ref } from 'vue'
const source = ref('hello')
const target = ref('')
syncRefs(source, target)
console.log(target.value) // 'hello'
source.value = 'world'
setTimeout(() => {
console.log(target.value) // 'world'
}, 100)License
MIT
Extracted from VueUse for standalone use.
