Tell us what’s happening:
so, i actually solved this but, i kinda did it like a blind man walking through a room… if you ask me how it reads… and why the way it reads works… heck… if I asked ME … i wouldn’t be able to answer… in all likelihood, if i erased my solution… i might find myself having to blindly fumble across the “room” again… Im going to continue to move on from here but my feeling is im going to need some help with the props stuff
ex: const Camper = props => <p>{props.name}</p>
as simple as this is once i wrote it… it took a whiiiile longer than i guess i think it should have to come up with…
once again… not quite sure what im asking but im hoping ive placed down enough context for someone to have “been where i am”
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: "Johnny"
}
Camper.propTypes = {
name: PropTypes.string.isRequired
}
Challenge: React - Review Using Props with Stateless Functional Components
Link to the challenge: