Open o-alexandrov opened 1 month ago
According to docs, LazyMotion:
animation will run when loadFeatures resolves.
However, initial part of MotionProps is set immediately.
initial
MotionProps
<m.div initial={{ opacity: 0 }} animate={{ opacity: 1 }}>{children}</m.div>
Problems:
LazyMotion.features
CodeSandbox reproduction of the bug
https://codesandbox.io/p/sandbox/framer-motion-lazymotion-32vhxp
Steps to reproduce
Steps to reproduce the behavior:
Hello
Expected behavior
If LazyMotion.features are loaded, only then initial, animate, exit and other MotionProps should trigger.
animate
exit
According to docs, LazyMotion:
However,
initial
part ofMotionProps
is set immediately.Problems:
LazyMotion.features
are loaded.CodeSandbox reproduction of the bug
https://codesandbox.io/p/sandbox/framer-motion-lazymotion-32vhxp
Steps to reproduce
Steps to reproduce the behavior:
Hello
printed on the screen becauseinitial
is triggered immediatelyExpected behavior
If
LazyMotion.features
are loaded, only theninitial
,animate
,exit
and other MotionProps should trigger.initial
is already mounted,initial
should be skipped