Using Prototypes to define the Props you expect - issues

Using Prototypes to define the Props you expect - issues
0

#1

I don’t understand. What am I missing?

const Items = (props) => {
  return <h1>Current Quantity of Items in Cart: {props.quantity}</h1>
};

// change code below this line
Items.propTypes = {
quantity: propTypes.number.isRequired
}
// change code above this line

Items.defaultProps = {
  quantity: 0
};

class ShoppingCart extends React.Component {
  constructor(props) {
    super(props);
  }
  render() {
    return <Items />
  }
};

Use Proptypes to define the Props you expect
#2

If you have a question about your own solution, either click the Ask for Help button or create a new topic. Please do not just tag an extra reply onto an existing post for questions about your own code. Replies to other topics should either answer the original poster’s question(s) or ask for clarification about any of the posts previously given.

Thank you.


#3

Remember that JavaScript is case-sensitive, so you have to pay close attention to the spelling/case of all variables, methods, etc. You have a spelling/case issue on the following line:

quantity: propTypes.number.isRequired