Skip to content

Instantly share code, notes, and snippets.

@atharva-bhange
Created February 24, 2025 18:08
Show Gist options
  • Save atharva-bhange/909df4c0ed7632597367cc34c7e4d274 to your computer and use it in GitHub Desktop.
Save atharva-bhange/909df4c0ed7632597367cc34c7e4d274 to your computer and use it in GitHub Desktop.
rn1
import {
SafeAreaView,
SafeAreaProvider,
} from 'react-native-safe-area-context';
import {
FlatList,
StyleSheet,
View,
} from 'react-native';
<SafeAreaProvider>
<SafeAreaView
style={styles.container}>
{/* <FlatList
data={DATA}
renderItem={({ item }) => (
<Item title={item.title} />
)}
keyExtractor={item => item.id}
/> */}
<FlatList
data={data}
renderItem={() => (
<View>
<Text>Test</Text>
</View>
)}
keyExtractor={item =>
item.id.toString()
}
// ItemSeparatorComponent={() => (
// <View
// style={{ height: 8 }}
// />
// )}
// onEndReached={() => {
// // Handle end of scroll here
// if (isLoading) return;
// fetchData(data.length);
// }}
// ListEmptyComponent={
// <Text>No data</Text>
// }
// onEndReachedThreshold={0.5}
/>
</SafeAreaView>
</SafeAreaProvider>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment