8000 perf(useAnimate): set `sync` false (#3916) · vueuse/vueuse@7b1082c · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 7b1082c

Browse files
JianJrohantfuautofix-ci[bot]
authored
perf(useAnimate): set sync false (#3916)
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent d431087 commit 7b1082c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/core/useAnimate/index.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { ComputedRef, Ref, ShallowRef, WritableComputedRef } from 'vue-demi'
2-
import { computed, nextTick, shallowReactive, shallowRef, watch } from 'vue-demi'
2+
import { computed, shallowReactive, shallowRef, watch } from 'vue-demi'
33
import type { MaybeRef, Mutable } from '@vueuse/shared'
44
import { isObject, objectOmit, toValue, tryOnMounted, tryOnScopeDispose } from '@vueuse/shared'
55
import type { MaybeComputedElementRef } from '../unrefElement'
@@ -241,9 +241,7 @@ export function useAnimate(
241241
}
242242
}, { deep: true })
243243

244-
tryOnMounted(() => {
245-
nextTick(() => update(true))
246-
})
244+
tryOnMounted(() => update(true), false)
247245

248246
tryOnScopeDispose(cancel)
249247

0 commit comments

Comments
 (0)
0