I’m learning to use react-native by creating an application, so I’m creating a scrollable homepage and inside it 10 rectangle with different names. If I understand correctly, you need to use flatlist to manage the scrolling of these rectangles, but I already have a scrollview within the same page. I have something like this:
<ScrollView>
<Image/>
<Text/>
<RectangleComponents/>
</ScrollView>
Inside RectanglesComponent is the code that creates the 10 rectangles. I’m currently using a ScrollView here too because I couldn’t use FlatList inside a ScrollView. Example of RectanglesComponent:
return (
<SafeAreaView style={styles.container}>
{Array.from(Array(10).keys()).map(i => (
<SafeAreaView key={i} style={styles.rectangle}/>
</SafeAreaView>
);
In this case i need to use FlatList or ScrollView is good?