class App extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
<Welcome name />
</div>
);
}
};
class Welcome extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
{this.props.name}<strong>Hello</strong>
</div>
);
}
};
Please link to the challenge.
Should be inside the strong element.
{this.props.name}
The name
prop should be given the value it is to display in the component it is passed to (it works just like function parameters/arguments).
<SomeComponent someProp="some value" />
// inside the SomeComponent component
this.props.someProp // some value
If you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Ask for Help button located on the challenge (it looks like a question mark). This button only appears if you have tried to submit an answer at least three times.
The Ask for Help button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.
Thank you.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.