I'm trying to make a ScrollView that will auto scroll to bottom in some time. But instead it is instantly scrolling to bottom.
moveScreen = () =>{
this.scrollViewRef.flashScrollIndicators();
this.scrollViewRef.scrollToEnd({duration: 5000, animated: true});}
setScrollViewRef = (element) => {
this.scrollViewRef = element;};
render(){
return (
<View style={{height:'100%', width:'100%',flexDirection:'row'}}>
<ScrollView ref={this.setScrollViewRef} style={{height:'100%',width:'90%'}} onContentSizeChange={()=> this.moveScreen()}>
{balloonList}
</ScrollView>
<View style={{height:'100%',width:'10%',justifyContent:'flex-end',}}>{bucketList}</View>
</View>
);}