0
私は以下のアニメーションを持っています。ネイティブアニメーション反復無限大に反応
componentWillMount(){
this.animatedValue = new Animated.Value(300);
}
componentDidMount(){
Animated.timing(this.animatedValue , {
toValue: -100,
duration: 3000,
}).start();
}
render() {
const animatedStyle = { marginLeft: this.animatedValue, marginRight: - this.animatedValue };
return (
<View style={{flexDirection: 'row', height: 100,}}>
<Animated.View style={[ animatedStyle,{backgroundColor: 'blue', width:100}]} />
</View>
);
}
私は無限の時間を繰り返したいと思います。誰でも何か提案がありますか?
これだけです。ありがとうございました –