I want to set up a stripe checkout using react and node.js. Compiles in node terminal but when I inspect the localhost:3000 page, this error message is returned
Each child in a list should have a unique "key" prop.
Check the render method of Cart.
- in tr (at cart/index.jsx:66)
- in Cart (at src/index.jsx:8)
<tbody>{
items.map(item => (
<tr>
<td>{item.name}</td>
<td>
<img
src={`/images/${item.apiId}.jpg`}
alt={item.name}
width={180}
/>
</td>
<td>{item.quantity}</td>
<td>{formatPrice(item.price)}</td>
</tr>)
)}
<tr>
import React from 'react'
import ReactDOM from 'react-dom'
import Cart from "./components/cart/"
ReactDOM.render(
<Cart stripeToken = "test-token" />,
document.getElementById("root")
)