why my code does not seem to pass the last challenge. it says to check if the prop is a number or not ,i think i did that in this line here :
quantity: PropTypes.number.isRequired
but still it wont pass the last test. anyone wanna help me understand whats going on here.
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 />
}
};
Link to the challenge: