I am trying to import data from the redux store and render in a table.
I tried a lot of times but always get this error: objects are not valid as a react child (found: object with keys {}). if you meant to render a collection of children, use an array instead.
I think i should use a .map method but i don't know how when i get the data with an useSelector
This is my redux store
The table which I want to render the data
<table className="table">
<thead>
<tr>
<th style={{ width: 100 }}>ID</th>
<th style={{ width: 150 }}>Nombre</th>
<th style={{ width: 150 }}>Precio</th>
<th style={{ width: 150 }}>Stock</th>
</tr>
</thead>
<tbody>
{
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
}
</tbody>
</table>
I used an useSelector to get the data from the store
const { body } = useSelector( state => state.coffe );
But now how can i render the data?
Or i'm doing something wrong?
Could someone help me figure it out? Thanks for your time!!
