BUG In "Use PropTypes to Define the Props You "

Just want to advise there´s a possible bug in the exercise “React: Use PropTypes to Define the Props You Expect”

It was giving me error and it was solved just changing this:

Items.propTypes = { quantity:
PropTypes.number.isRequired
}

To this:

Items.propTypes = {
quantity: PropTypes.number.isRequired
}

As far as I´m concerned the first one should also work right? There´s no rules of identitation in javascript right?

You cannot put the key and value on different lines.

1 Like