plus1tv / react-anime

✨ (ノ´ヮ´)ノ*:・゚✧ A super easy animation library for React!
https://codepen.io/collection/nrkjgo/
MIT License
1.55k stars 81 forks source link

Is there a way to trigger the animation manually while autoplay is false? #50

Open harryluo91 opened 5 years ago

harryluo91 commented 5 years ago

Hi, I've been trying to find a way to trigger the animation manually based on some conditions, but it looks like the only way to get a reference to the animation instance is through one of the begin, update or complete callback functions, and they all require the autoplay prop to be true to trigger. Is there any way that we can get the animation instance when the component mount?

kidandcat commented 5 years ago

dude, you are using react, change autoplay={true|false} whenever you need it

WilliamIPark commented 5 years ago

To be fair that's a pretty poorly named prop if the intended method to play an animation is through it.

liamclarkedev commented 4 years ago

Changing autoplay to true|false does not work as intended for me. Changing this, removes all children on the Anime component