Im currently having trouble with rendering an arary of objects into my react native flatlist.
This is my array:
const item = [
{
"id": 59,
"id_order": Object {
"created": "23/08/2021 16:37:55",
"direccion_extra": "codigo: 0592",
"id": 39,
"id_cliente": 35,
"monto_pago_efectivo": null,
"status": 1,
"tipo_pago": 2,
},
},
{
"id": 58,
"id_order": Object {
"created": "23/08/2021 16:37:55",
"direccion_extra": "codigo: 0592",
"id": 39,
"id_cliente": 35,
"monto_pago_efectivo": null,
"status": 1,
"tipo_pago": 2,
},
},
]
This is the Flatlist I am trying to render:
<FlatList
data={item}
renderItem={({ itemProduct, index }) => <ProductCard item={{itemProduct}} />}}
keyExtractor={(item, index) => index.toString()}
/>
However, I cannot receive each of the array's objects in the ProductCard component. Any ideas are appreciated!