kod

kod
mail@pastecode.io avatar
unknown
javascript
2 years ago
363 B
2
Indexable
Never
  spinValue = new Animated.Value(0);
  Animated.loop(
    Animated.timing(this.spinValue, {
      toValue: 1,
      duration: 3000,
      useNativeDriver: true,
    }),
  ).start();
  // Next, interpolate beginning and end values (in this case 0 and 1)
  const spin = this.spinValue.interpolate({
    inputRange: [0, 1],
    outputRange: ['0deg', '360deg'],
  });