Marson,
... возможно так
let stateMarket = {
products: [
{id:1, product: 'Rake'},
{id: 2, product: 'Pitchfork'}
],
cart: []
};
const addInCart = (i) => {
cart.push(props.products[i])
};
debugger
let elementMarket =products.map((e,i) =>{return <div>
<h2><li>{e.product}</li></h2>
<button onClick={addInCart(i)}>Added to Card</button>