Tell us what’s happening:
Getting a few errors thrown my way via the console but the most troubling is the “Campsite component doesn’t render error”…no clue why this is happening…
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>Hi my name is
<CampSite Camper={props.name} />
</p>
</div>
)
}
Camper.defaultProps= {name: 'CamperBot'}
Camper.propTypes = {name: PropTypes.isRequired.string}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/front-end-libraries/react/review-using-props-with-stateless-functional-components/