I have the following code for animating in React Native
Animated.timing( this.state.absoluteChangeX, {toValue: 0}, ).start(function() { this.lastX = 0; this.lastY = 0; });
Pretty simple, but whenever it fires, I get an error: singleValue.stopTracking is not a function
Here where the error occurs:
/react-native/Libraries/Animates/src/AnimtaedImplementation.js
var timing = function( value: AnimatedValue | AnimatedValueXY, config: TimingAnimationConfig, ): CompositeAnimation { return maybeVectorAnim(value, config, timing) || { start: function(callback?: ?EndCallback): void { var singleValue: any = value; var singleConfig: any = config; singleValue.stopTracking();
I am not very good at typeScript, but var singleValue: any means that "singleValue" can be any type. In my case, this is a number. Since numbers have no methods, it makes sense that this will be a mistake.
Am I doing something wrong?
react-native
jaxoncreed
source share