Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6290

React Native: Custom Component for FlatList Content Container

$
0
0

Is there any way so that I can add a custom component for FlatList items?I want to "wrap" my FLatList items with custom component equivalent to this

<ScrollView    pt={8}    px={16}    pb={128}><Card elevate size='$2' bordered><YGroup separator={<Separator />}>            {data.map(({value, index}) => {<InterfaceItem ... />            })}</YGroup></Card></ScrollView>

Note that the items is "wrapped" inside <Card> and <YGroup> componentsHow can I achieve the same result by using FlatList?

I have tried wrapping the items with component in renderItem method, but the wrapper components get iterated too.


Viewing all articles
Browse latest Browse all 6290

Trending Articles