FormidableLabs / react-animations

🎊 A collection of animations for inline style libraries
MIT License
3.06k stars 160 forks source link

Animation not repeat when prop changed #26

Open thehatami opened 6 years ago

thehatami commented 6 years ago

after first fire, animation not repeat when prop changed. how can i do that?

barrymichaeldoyle commented 6 years ago

I'm also having the same issue. My animation can slide in but then doesn't slide out again.

jaotors commented 5 years ago

@thehatami what i did is when the props has been changed, i userequestAnimationFrame like this

onAnimateClick = val => {
    this.setState({ currentSelectedAnimate: 'None' }, () => {
      requestAnimationFrame(() =>
        this.setState({ currentSelectedAnimate: val })
      );
    });
  };

I hope it helps.

chiumax commented 5 years ago

Please post context please @jaotors

nsoufian commented 5 years ago

Me too please fix it