Use Default Props: What am I missing?

Use Default Props: What am I missing?
0

#1

Tell us what’s happening:
I feel like I’m almost there. What am I missing?

Your code so far


const ShoppingCart = (props) => {
  return (
    <div>
      <h1>Shopping Cart Component</h1>
    </div>
  )
};
// change code below this line
ShoppingCart.defaultProps= {items:'0' };

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 7.0; LGMS210 Build/NRD90U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.109 Mobile Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/front-end-libraries/react/use-default-props/


#2

See your code simple Don’t use the single quote. see the value as mention in the lesson.


#3

Yes, items should be set to the number 0, not the string '0'


#4

Thank you, All! It works now :slight_smile: