forked from veactjs/veact
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
44 lines (33 loc) · 1.19 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**
* @module veact
* @author Surmon <https://github.com/surmon-china>
*/
import { watcherInstance } from './watch'
// redirect all APIs from @vue/reactivity
export * from '@vue/reactivity'
export * from "./setup/setupComponents"
export { watch as baseWatch } from '@vue/reactivity'
// lifecycle hooks
export { onMounted, onUpdated, onBeforeUnmount } from './lifecycle'
// ref and hooks
export { useRef, useShallowRef, useCustomRef } from './ref'
// reactive and hooks
export { useReactive, useShallowReactive } from './reactive'
// readonly and hooks
export { useReadonly, useShallowReadonly } from './readonly'
// computed and hooks
export { useComputed } from './computed'
// watch and hooks
export { watcherInstance, useWatch } from './watch'
//兼容处理
const watch=watcherInstance.watch.bind(watcherInstance);
export {watch};
export * from "./observer"
export type { WatchOptions, MultiWatchSources } from './watch'
// watchEffect and hooks
export { watchEffect, useWatchEffect } from './watchEffect'
export type { WatchEffectOptions } from './watchEffect'
// effectScope hooks
export { useEffectScope } from './effectScope'
// reactivity enhancer hooks
export { useReactivity } from './reactivity'