Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
feat: new watchPostEffect api
  • Loading branch information
antfu committed Aug 9, 2021
1 parent 0133c1e commit 92fe90c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/apis/watch.ts
Expand Up @@ -396,6 +396,10 @@ export function watchEffect(
return createWatcher(vm, effect, null, opts)
}

export function watchPostEffect(effect: WatchEffect) {
return watchEffect(effect, { flush: 'post' })
}

// overload #1: array of multiple sources + cb
// Readonly constraint helps the callback to correctly infer value types based
// on position in the source array. Otherwise the values will get a union type
Expand Down

0 comments on commit 92fe90c

Please sign in to comment.