beekai-oss / react-simple-animate

🎯 React UI animation made easy
https://react-simple-animate.now.sh/
MIT License
1.82k stars 61 forks source link

useAnimateKeyFrames animation runs when component is updated via other useState variables. #78

Closed zero-is-one closed 3 years ago

zero-is-one commented 3 years ago

Describe the bug useAnimateKeyFrames animation runs when component is updated via other useState variables.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'https://codesandbox.io/s/useanimatekeyframes-forked-91bjc?file=/src/index.js'
  2. Click on 'Trigger' button
  3. Animation Starts (it should not)

Expected behavior The animation should not start. For instance I did this with useAnimate hook without issue. https://codesandbox.io/s/useanimate-iuui5?from-embed=&file=/src/index.js

zero-is-one commented 3 years ago

Wow, thanks so much! Great job and so fast. Enjoying the library.