https://reactnative.dev/docs/flatlist
https://demystifiedcode.medium.com/how-to-use-a-flatlist-inside-a-scrollview-in-react-native-ffb24ef2488c#:~:text=To%20use%20a%20FlatList%20inside%20a%20ScrollView%2C%20you%20can%20just,will%20handle%20rendering%20the%20items.
to aviod such warning we can add our extra static content to the flatlist props "ListHeaderComponent"
<FlatList
data={yourdata}
ItemSeparatorComponent={FlatListItemSeparator}
renderItem={({ item }) => (
<Text
style={styles.FlatList_Item}
onPress={() => GetItem(item.key)}
>
{item.key}
</Text>
)}
ListHeaderComponent={() => (
<Text
style={styles.FlatList_Header}
>
Header Text
</Text>
)}
/>
0 Comments
Post a Comment