Use PropTypes to Define the Props You Expect -- HELP

Use PropTypes to Define the Props You Expect -- HELP
0

#1

Tell us what’s happening:

I wrote everything correctly but it is not passing the test. Help me please

Your code so far


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

// change code below this line
Items.protoTypes = { 
  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 />
  }
};

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/front-end-libraries/react/use-proptypes-to-define-the-props-you-expect/


#2

You might want to check your spelling here…


#3

Thank you very much, I spent days wondering what was wrong with my code