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