0
votes

I am fetching data from two collection from firestore. and set data as two state in componentDidUpdate(). now I want to display those state as flatlist data as data props of flatlist. how can I Achive this?

1

1 Answers

1
votes

In the FlastList data prop you can send something like [...state1, ...state2]

<FlatList data={[...state1, ...state2]} renderItem={renderItem} />