0
I have an array of data coming from the firestore. With the data received by the firestore I make a map
to make the display available as a table. When I try to make a table reduce
to compute the sum of all values, returns that the reduce
is not a function
.
Follow the data coming from the firestore:
{data: 1/1, desc: 'conta de gás', price: 138}
My map:
{viewContas && viewContas.map(vc => {
if(auth === vc.authorId)
return (
<tr key={vc.id}>
<td>{vc.data}</td>
<td>{vc.desc}</td>
<td>R${vc.price}</td>
<td>
I can’t use {vc.price.reduce(~~)}
.