Tell us what’s happening:
Describe your issue in detail here.
Your code so far
const Items = (props) => {
return <h1>Current Quantity of Items in Cart: {props.quantity}</h1>
}
Items.defaultProps = {
quantity: 0
}
class ShoppingCart extends React.Component {
constructor(props) {
super(props);
}
render() {
<Items quantity ={10}/>
return <Items />
{ /* Change code above this line */ }
}
};
Your browser information:
User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0
Challenge: React - Override Default Props
Link to the challenge: