Override Default Props - braces around quantity

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.props = quantity:{10}/>
    { /* change code above this line */ }

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36.

Link to the challenge:

They gave you a clue which was to use the same syntax to set the property as you would if it was an html attribute.
So for eg. In real html, if we had an attribute called quantity we would have written this

<item quantity=10></item>

So that is their hint… does seeing it now help you? (This is my hint)

1 Like

Yes! Thank you! Removing the props was key.

1 Like