vue-reactify
v1.0.0
Published
Vue 3 utility converting plain functions to work with refs
Downloads
4
Maintainers
Readme
Installation
npm install vue-reactifyUsage
import { reactify } from 'vue-reactify'
import { ref } from 'vue'
const add = (a: number, b: number) => a + b
const reactiveAdd = reactify(add)
const a = ref(1)
const b = ref(2)
const result = reactiveAdd(a, b)
console.log(result.value) // 3
a.value = 5
console.log(result.value) // 7License
MIT
Extracted from VueUse for standalone use.
