Im trying to implement a FlatList with dynamic item sizes, to be more specific, my items sometimes take the full screen width and sometimes only half of it, thus setting numColumns={2} isn't working, my workaround looks like this:
<FlatList
ListHeaderComponent={this.header}
keyExtractor={item => item.id.toString()}
data={data}
contentContainerStyle={{ flexDirection: 'row' }}
renderItem={({ item }) => <Item item={item} />}
/>
everything is working as expected, the width of an item is applied via item.width. However the issue is that every time it's rendering the list, im getting this log warning:
Warning: `flexWrap: `wrap`` is not supported with the `VirtualizedList` components.Consider using `numColumns` with `FlatList` instead.
Does anybody know how this is affecting the performance of the list and if it has an affect, how I can improve my code ?
This is how I would like it to look like: