Help about this code

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
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) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36.

Challenge: Review Using Props with Stateless Functional Components

Link to the challenge:

Hi @egebagcivan !

Welcome to the forum!

You haven’t defined the camper component.
You also didn’t do this part of the instructions

Inside the Camper component, render any code that you want, but make sure to have one p element that includes only the name value that is passed in as a prop

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