Tell us what’s happening:
The below test case does not pass.Help me out and thanks in advance.
The Items
component should include a propTypes
check that requires quantity
to be a number
Your code so far
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 />
}
};
Your browser information:
User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
.
Link to the challenge: