Https://learn.freecodecamp.org/front-end-libraries/react/review-using-props-with-stateless-functional-components/

Https://learn.freecodecamp.org/front-end-libraries/react/review-using-props-with-stateless-functional-components/
0

#1

class CampSite extends React.Component {
constructor(props) {
super(props);
}
render() {
return (




);
}
};
// change code below this line

const Camper = props => {
return

{props.name}


};

Camper.propTypes={
name:PropTypes.string.isRequired,
};

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

jejus, i tried many ways to do this
but still im stuck in there.

what is wrong with me and this?

any idea?

(i tried whitespace issues)


#2

Not sure if this will help, but is the comma at the end necessary?


#3

well i think attach , as trailer in object is quite good habbit.
actually depends on person i will try


#4

yea,
the problem was the comma…
thanks… :frowning: