HELP!Review Using Props with Stateless Functional Components

Tell us what’s happening:

Your code so far


class CampSite extends React.Component {
  constructor(props) {
    super(props);
  }
  render() {
    return (
      <div>
        <Camper />
      </div>
    );
  }
};
// change code below this line
const Camper=props=>(<p>{props.name}</p>)

Camper.defaultprops={
  name:'CamperBot'
};
Camper.propTypes={
  name: PropTypes.string.isRequired
};


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0.

Link to the challenge:

Should be defaultProps

2 Likes