79171666

Date: 2024-11-08 21:50:23
Score: 1.5
Natty:
Report link

When passing props to components in React, they're passed as key: value pairs through the default props object in the parameters of the component. To access the value of product you should do it like so:

const SingleProduct = (props) => {
    console.log(props.product)
    ...
};

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Starts with a question (0.5): When
  • Low reputation (1):
Posted by: Artemiy Brukhno