feat(runtime-core): add watchEffect API

BREAKING CHANGE: replae `watch(fn, options?)` with `watchEffect`

    The `watch(fn, options?)` signature has been replaced by the new
    `watchEffect` API, which has the same usage and behavior. `watch`
    now only supports the `watch(source, cb, options?)` signautre.
This commit is contained in:
Evan You
2020-02-22 08:19:10 +01:00
parent b36a76fe23
commit 99a2e18c97
8 changed files with 77 additions and 31 deletions

View File

@@ -17,7 +17,7 @@ export {
markNonReactive
} from '@vue/reactivity'
export { computed } from './apiComputed'
export { watch } from './apiWatch'
export { watch, watchEffect } from './apiWatch'
export {
onBeforeMount,
onMounted,