From 872938bdd14bb4a3963be0a2aafc3ad9c093bfe4 Mon Sep 17 00:00:00 2001 From: Leon Xu Date: Thu, 5 May 2022 21:32:37 -0700 Subject: [PATCH] doc: add id as prop to Product function --- src/Product/Product.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Product/Product.js b/src/Product/Product.js index 213dc14..13dec4b 100644 --- a/src/Product/Product.js +++ b/src/Product/Product.js @@ -2,7 +2,7 @@ import React from "react"; import { useStateValue } from "../redux/StateProvider"; import "./Product.css"; -function Product({ title, image, price, rating }) { +function Product({ id, title, image, price, rating }) { const [{ basket }, dispatch] = useStateValue(); const addToBasket = () => {