I am using FlatList to show my card components in my app.
And I want to show another component (like an ads or an announcement component) after certain numbers of cards in the list.
As an illustration, it should look like as below;
- card item
- card item
- card item
- card item
-COMPONENT-
- card item
- card item
- card item
- card item
-COMPONENT-
...continues...
..
There is no such functionality in built into FlatList. However, one way of doing this would be to add the ads to the data that is passed into the FlatList and modify the
renderItem
function to also be able to render them.