Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}).start(() => {
this._angle.setValue(this.angle % oneTurn);
const snapTo = snap(oneTurn / numberOfSegments);
Animated.timing(this._angle, {
toValue: snapTo(this.angle),
duration: 300,
useNativeDriver: true
}).start(() => {
const winnerIndex = this._getWinnerIndex();
this.setState({
enabled: true,
finished: true,
winner: this._wheelPaths[winnerIndex].value
});
});
// do something here;
});
}