[英]TypeError: Cannot read properties of undefined (reading 'match'):
Product.find((x)=>x._id===props.params.match.id);
products: [
{
_id: '1',
name: 'Nike Slim Shirt',
category: 'Shirts',
image: '/images/p1.jpg',
price: 120,
countInStock: 10,
brand: 'Nike',
rating: 4.5,
numReviews: 10,
description: 'high quality product',
},
因為Params屬性未定義。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.