xxxxxxxxxx
import React, { useRef } from 'react';
import { ScrollView } from 'react-native';
const App = () => {
const refScroll = useRef();
return(
<View>
<TouchableOpacity
onPress={()=>{
refScroll.current.scrollToEnd({animated:true});
}}
>
<Text>Scroll To End</Text>
</TouchableOpacity>
<ScrollView style={{width:'100%',flex:1}} ref={refScroll}>
.
</ScrollView>
</View>
);
}
export default App;