javascript - React Native AnimationExperimental callback? -
i've been playing around react native , animations , run animations in serial or chain animations together. there promise or callback fires when animation finished? have far:
animationexperimental.startanimation({ node: this.refs['this'], duration: 500, easing: 'easeinoutcubic', property: 'scalexy', tovalue: [2,2], callback: () => { // doesn't work idea. console.log("callback called!"); } });
update:
i found out animationexperimental has been deprecated. facebook working on different animations library should land soon. can check out react-native-gsap library if can't wait facebook or aminationexerimental doesn't work you
the callback second parameter:
animationexperimental.startanimation({ node: this.refs['this'], duration: 500, easing: 'easeinoutcubic', property: 'scalexy', tovalue: [2,2] }, () => { console.log("callback called!"); });
Comments
Post a Comment