chenglou / react-motion

A spring that solves your animation problems.
MIT License
21.68k stars 1.15k forks source link

Get component styles before animation? #529

Open dsaisho opened 6 years ago

dsaisho commented 6 years ago

Hey!

Im wondering how to get component styles before the TransitionMotion animation happens.

I have an animation that is bringing something to full scale. It takes a component, starts scale at 0 then tweens it to 1.

I need to check the height of the component that is going to be animated incase it is too large, I am only able to get the height information after the animation happens in the parent componentDidUpdate method.

Anyone have suggestions on how to solve for this?

Thanks