React "Review Using Props with Stateless Functional Components"

Tell us what’s happening:
I made an function, but something went wrong.
Your code so far


class CampSite extends React.Component {

render() {
  return (
    <div>
      <Camper/>
    </div>
  );
}
};
// Change code below this line
function Camper(props) {

 {props.name = 'CamperBot' };
 
   render() {
     return (
  <p>{props.name}</p>
     )
}
}
Camper.propTypes = {
name: propTypes.string
};

  **Your browser information:**

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Safari/605.1.15.

Challenge: Review Using Props with Stateless Functional Components

Link to the challenge:

I cant be sure, as I hate react with passion, and haven’t use it in years. But I would guess this line of code is the issue. Why do you have this statement in curly braces?

1 Like

I would suggest you revisit the following challenges.

1 Like