import React from 'react'; import { RefreshControl, SafeAreaView, ScrollView, StyleSheet, Text, } from 'react-native'; const App = () => { const [refreshing, setRefreshing] = React.useState(false); const onRefresh = React.useCallback(() => { setRefreshing(true); setTimeout(() => { setRefreshing(false); }, 2000); }, []); return ( <SafeAreaView style={styles.container}> <ScrollView contentContainerStyle={styles.scrollView} refreshControl={ <RefreshControl refreshing={refreshing} onRefresh={onRefresh} /> }> <Text>Pull down to see RefreshControl indicator</Text> </ScrollView> </SafeAreaView> ); };