Review Using Props with Stateless Functional Components 01

Tell us what’s happening:
Dont know why its not working. Shows error : The Camper component should include prop types which require the name prop to be of type string.

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) => <p>{props.name}</p>

Camper.defaultProps = {name:‘CamperBot’};

Camper.propTypes = {name: PropTypes.string.IsRequired};


**Your browser information:**

User Agent is: <code>Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36</code>.

**Link to the challenge:**
https://learn.freecodecamp.org/front-end-libraries/react/review-using-props-with-stateless-functional-components

@MMehta You’re close! Use isRequired instead of IsRequired.

Also, in the future, surround code with ``` to make it format better in the forum, like this:

https:/uploads/default/original/2X/4/470db50cc014204906db4a54e53a7442df544643.gif

Thank you! that worked!