Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
playAnimate() {
Animated.parallel([this.scaleAnimation()]).start(this.playedAnimate.bind(this));
}
componentDidUpdate(prevProps: any, prevState: any) {
if (this.props.selected !== prevProps.selected) {
const duration = AnimationDuration
Animated.parallel([
Animated.timing(this.state.textOpacity, { toValue: 1, duration }),
Animated.timing(this.state.backgroundColor, { toValue: this.props.selected ? 1 : 0, duration }),
]).start(this.props.onSelectionAnimationFinished)
}
}