0
React native flatlist 2 api data use
How to use 2api data in one flafList ? One api data - name and price Second api data - images array How to combine??
1 Answer
+ 1
The FlatList is not the issue here.
Assuming you want to do some kind of merge between the data returning from the APIs, you need to first make the call to BOTH APIs, wait for the all results and then merge the data.
Yoy can use Promise.all(...) to wait for all promises to be resolved.
These links may help
https://stackoverflow.com/a/57205276
https://youtu.be/Mt3kxUvHORA
https://medium.com/@dev.ankursehdev/multiple-api-calls-in-react-using-axios-with-loading-and-error-handling-ae8584937b7c