Reputation: 745
How can I make my flatlist look like this? Is there any prop for this or which style I need to use to do that?
Upvotes: 5
Views: 13471
Reputation: 81
<FlatList
numColumns={2}
....................
/>
Render your data and make numColumns={2}
Upvotes: 4
Reputation: 10655
You can provide extra property numColumns={2}
in your Flatlist component to get two items each row.
here is a wonderful tutorial by Spencer: https://www.reactnativeschool.com/react-native-flatlist-grid
Upvotes: 11
Reputation: 16334
You have to use the numColumns prop of the flat list which would display the items in columns
https://reactnative.dev/docs/flatlist#numcolumns
Upvotes: 3