React - Review Using Props with Stateless Functional Components

Why is it not working:

Describe your issue in detail here.

Your code so far

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

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36

Challenge Information:

React - Review Using Props with Stateless Functional Components

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.

Hi @greatoyesola

You did not enter any code into the editor.

  • The CampSite component should render.
  • The Camper component should render.
  • The Camper component should include default props which assign the string CamperBot to the key name.
  • The Camper component should include prop types which require the name prop to be of type string.
  • The Camper component should contain a p element with only the text from the name prop.
  • [ReferenceError: Camper is not defined]

Start by defining the Camper componenet.

Happy coding

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