BUG? - "Review using props with stateless Functional Components

Is there a bug with this lesson? I’ve corroborated my answer with the solution provided for this tutorial but the last test won’t pass:

Last Test: "The Camper component should contain a

element with only the text from the name prop. "

Any ideas?

  **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) => {
return (
  <div>
    <p> {props.name} </p>
  </div>
)
};

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


  **Your browser information:**

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.115 Safari/537.36

Challenge: Review Using Props with Stateless Functional Components

Link to the challenge:

Read the error message very carefully:

" The Camper component should contain a p element with only the text from the name prop."

Spaces are considered part of the text, so you don’t want to add any that shouldn’t be there :slight_smile:

1 Like

:man_facepalming:

that’s embarrassing . Thank you for the important reminder!