Skip to content

Commit 92fe90c

Browse files
committed
feat: new watchPostEffect api
1 parent 0133c1e commit 92fe90c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/apis/watch.ts

+4
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,10 @@ export function watchEffect(
396396
return createWatcher(vm, effect, null, opts)
397397
}
398398

399+
export function watchPostEffect(effect: WatchEffect) {
400+
return watchEffect(effect, { flush: 'post' })
401+
}
402+
399403
// overload #1: array of multiple sources + cb
400404
// Readonly constraint helps the callback to correctly infer value types based
401405
// on position in the source array. Otherwise the values will get a union type

0 commit comments

Comments
 (0)