We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
watchSyncEffect
1 parent 31d85d4 commit e12c23dCopy full SHA for e12c23d
src/apis/watch.ts
@@ -400,6 +400,10 @@ export function watchPostEffect(effect: WatchEffect) {
400
return watchEffect(effect, { flush: 'post' })
401
}
402
403
+export function watchSyncEffect(effect: WatchEffect) {
404
+ return watchEffect(effect, { flush: 'sync' })
405
+}
406
+
407
// overload #1: array of multiple sources + cb
408
// Readonly constraint helps the callback to correctly infer value types based
409
// on position in the source array. Otherwise the values will get a union type
0 commit comments