-
As the title specified, these are the useSpring props I've passed: const styles = useSpring({
config: config.gentle,
from: { transform: " scale(0.95)", opacity: 0 },
to: {
opacity: appear ? 1 : 0,
transform: "scale(1)",
},
}); I notice this issue is only present with transform, once that is removed the issue is gone. but of course that defeats the propose of my animation. an additional thing I've also noticed is that when I pass |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Ok i think I've whip up a quick solution for myself. added a state change onRest to convert end style transform: none. Although I thought it would rerun the animation again from scale(0.95) -> to transform: "none" - which I don't see here. const styles = useSpring({
config: config.gentle,
from: { transform: "scale(0.95)", opacity: 0 },
to: {
opacity: appear ? 1 : 0,
transform: endTransform ? "none" : "scale(1)",
},
onRest: {
transform: () => setEndTransform(true)
}
}); |
Beta Was this translation helpful? Give feedback.
Ok i think I've whip up a quick solution for myself. added a state change onRest to convert end style transform: none. Although I thought it would rerun the animation again from scale(0.95) -> to transform: "none" - which I don't see here.