Need assistance in review-using-props-with-stateless-functional-components

Need assistance in review-using-props-with-stateless-functional-components
0

#1

Possibly I’ve missed something but I don’t think so - could it be a bug?

Challenge Name

review-using-props-with-stateless-functional-components has an issue.

Issue Description

Browser Information

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36.

Screenshot

Your Code


class CampSite extends React.Component {
  constructor(props) {
    super(props);
  }
  render() {
    return (
      <div>
        <Camper name='camper' />
      </div>
    );
  }
};
// change code below this line
class Camper extends React.Component {
  constructor(props) {
    super(props);
  }
  render() {
    return (
      <p>{this.props.name}</p>
    );
  }
};
Camper.propTypes = {name:PropTypes.string.isRequired};
Camper.defaultProps = { name : "user"};

#2

The instructions say:

Define the Camper component and assign it default props of { name: ‘CamperBot’ }.

You assigned “user” to be the default value of the name property of Camper.