Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.state.fillValue.addListener(() => {
const { fill, angleLength, startAngle } = this.props;
const { fillValue } = this.state;
const fillColor = startAngle + 1;
const fillPartition = fillColor/7;
const color = fillValue.interpolate({
inputRange: [fillColor - fillColor, fillColor - (fillPartition * 6), fillColor - (fillPartition * 5), fillColor - (fillPartition * 4), fillColor - (fillPartition * 3), fillColor - (fillPartition * 2), fillColor - (fillPartition * 1), fillColor],
outputRange: ['rgb(0,0,0)', 'rgb(255,0,0)', 'rgb(0,255,0)', 'rgb(0,0,255)', 'rgb(255,0,255)', 'rgb(0,255,255)', 'rgb(255,255,0)', 'rgb(255,255,255)'],
});
this.path.setNativeProps({
fill: extractBrush(color.__getAnimatedValue()),
});
});
}