azazdeaz / react-gsap-enhancer

Use the full power of React and GSAP together
MIT License
727 stars 38 forks source link

reverse() doesn't work #16

Closed vedmant closed 8 years ago

vedmant commented 8 years ago

Hi, I have this weird problem with reverse() method on controller, I launch it when some particular property was changed, but reverse animation doesn't happen. Tested methods like restart(), time(), they work fine.

azazdeaz commented 8 years ago

Hi @vedmant! I made a quick demo to test this issue but it works for me. http://codepen.io/azazdeaz/pen/QNdRXy?editors=0010 Can you reproduce it somewhere? (You can fork this pen for example)

vedmant commented 8 years ago

It happens when I use componentWillReceiveProps to launch animations when particular properties were changed. I use Redux and control animation with actions, also this will be complex animation with several components animated responding on particular state change. Reproduced it here http://codepen.io/vedmant/pen/GZrVXO?editors=0110

azazdeaz commented 8 years ago

Thanks a lot for your description. It was indeed a bug in react-gsap-enhancer. The fixed version is v0.2.2.

vedmant commented 8 years ago

Great, thanks!