React/Default props

Tell us what’s happening:
Could you please support me with advice, like I did everything, as explained in the task, but I missed something.
Your code so far


const ShoppingCart = (props) => {
return (
  <div>
    <h1>Shopping Cart Component</h1>
  </div>
)
};
// Change code below this line
ShoppingCart.defaultProps = {item: 0};
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.115 Safari/537.36

Challenge: Use Default Props

Link to the challenge:

Just a typo, it’s items not item.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.