react-native-indicator
Advanced tools
Comparing version 0.5.5 to 0.5.6
@@ -53,8 +53,3 @@ /** | ||
componentDidMount() { | ||
this.state.opacities.forEach((item, i) => { | ||
const id = setTimeout(() => { | ||
this._animation(i) | ||
}, i * 250); | ||
this.timers.push(id); | ||
}); | ||
this._animation(); | ||
} | ||
@@ -64,16 +59,19 @@ | ||
this.unmounted = true; | ||
this.timers.forEach((id) => { | ||
clearTimeout(id); | ||
}); | ||
} | ||
_animation(i) { | ||
Animated.sequence([ | ||
Animated.timing(this.state.opacities[i], {toValue: 0.2, duration: 500}), | ||
Animated.timing(this.state.opacities[i], {toValue: 1, duration: 500}) | ||
_animation() { | ||
function seq(self, i) { | ||
return Animated.sequence([ | ||
Animated.timing(self.state.opacities[i], {toValue: 0.2, duration: 300, delay: i*200}), | ||
Animated.timing(self.state.opacities[i], {toValue: 1, duration: 300}) | ||
]) | ||
} | ||
Animated.parallel([ | ||
seq(this, 0), seq(this, 1), seq(this, 2) | ||
]).start(() => { | ||
if (!this.unmounted) | ||
this._animation(i); | ||
this._animation(); | ||
}); | ||
} | ||
} |
{ | ||
"name": "react-native-indicator", | ||
"version": "0.5.5", | ||
"version": "0.5.6", | ||
"description": "React Native Indicator Component", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
0
861828
1023