React - Review Using Props with Stateless Functional Components

Tell us what’s happening:

I’m getting an error that the constructor must be either a function or null. I’m not sure where the error is.

Your code so far

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

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/128.0.0.0 Safari/537.36

Challenge Information:

React - Review Using Props with Stateless Functional Components

Hi @KoduFCC

Here is a post you may find helpful.

Happy coding