@reactivity-vue/watch
v0.0.1
Published
The missing `watch` for @vue/reactivity
Downloads
2
Readme
@reactivity-vue/watch
The (missing) watch for @vue/reactivity. Works without Vue.
Install
npm install --save-dev @reactivity-vue/watch
Usage
import { computed, reactive, ref } from '@vue/reactivity'
import { watch, watchEffect } from '@reactivity-vue/watch'
const count = ref(1)
const stopWatch = watch(
count,
(newValue) => {
console.log(`Count: ${newValue}`)
}
)
count.value += 1
// Count: 2
stopWatch()