About what to do at the end of the code

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**

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

Items.defaultProps = {
quantity: 0

class ShoppingCart extends React.Component {
constructor(props) {
render() {
  { /* Change code below this line */ }
  return <Items />
  { /* Change code above this line */ }

  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36

Challenge: Override Default Props

Link to the challenge:

Can you be more descriptive of what issue you are having? What you don’t understand?

I see the error message:

The Items component should have a prop of { quantity: 10 } passed from the ShoppingCart component.

I see that you are trying to use that prop in Items:

return <h1>Current Quantity of: {props.quantity}</h1>

I don’t see where you are passing it:

return <Items />

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.