AnimatedFoo = animated(Foo) doesn't work -- or how to animate a Component? #1439
Answered
by
joshuaellis
nonopolarity
asked this question in
Support
-
🤓 QuestionIn Basics: https://react-spring.io/basics const AnimatedDonut = animated(Donut) because I think So I tried: https://codesandbox.io/s/weathered-breeze-ghdse const AnimatedFoo = animated(Foo);
// ....
return <AnimatedFoo style={props}>I will fade in</AnimatedFoo>; but it doesn't animated. Is it supposed to be the way it works? |
Beta Was this translation helpful? Give feedback.
Answered by
joshuaellis
Apr 21, 2021
Replies: 1 comment 4 replies
-
you're using Animated as a HOC, but you're not passing the props to the root element. So no, it won't animate. It can't without the props. |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
joshuaellis
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you're using Animated as a HOC, but you're not passing the props to the root element. So no, it won't animate. It can't without the props.