UNPKG

@vue-widget/hooks

Version:

hooks from react to vue

7 lines (6 loc) 342 B
import { type WatchSource } from "vue"; type CleanUp = () => void; export type EffectCallback<V = any, OV = any> = (value: V, oldValue: OV) => CleanUp | void; export type EffectType = "useEffect" | "useLayoutEffect"; export declare function createEffect(type: EffectType): (callback: EffectCallback, deps?: WatchSource[]) => void; export {};