Couldn't figure out the code and everytimewebsite crashes

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**

class App extends React.Component {
constructor(props) {
  super(props);

}
render() {
  return (
      <div>
          { /* Change code below this line */ }
          <Welcome />
          { /* Change code above this line */ }
      </div>
  );
}
};

class Welcome extends React.Component {
constructor(props) {
  super(props);

}
render() {
  return (
      <div>
        { /* Change code below this line */ }
        <p>Hello, <strong></strong>!</p>
        { /* Change code above this line */ }
      </div>
  );
}
};
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36

Challenge: Access Props Using this.props

Link to the challenge:

can somebody help me?

Hello there.

Do you have a question?

If so, please edit your post to include it in the Tell us what’s happening section.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more information you give us, the more likely we are to be able to help.

getting error again and again
The

Welcome

component should have a prop called

name

. The

Welcome

component should display the string you pass as the

name

prop within

strong

tags.

@Mitanshu07 from your screen grab you haven’t written any code
the challenge wants you to render the child component welcome in the parent component App then pass a property to it . Finally you access this property in the child component placing it within the strong tag, remember as this is a class component you must prefix with ‘this’ when accessing prop value
Illustration

class  Main extends React.Component {
    constructor(props) {
      super(props)
    }
render(){
    return (
    <div>
        <Child  name = "a string value"   />
    </div>
)
    }
} 
class  Child extends React.Component {
    constructor(props) {
      super(props)
    }
render(){
    return (
    <div>
        <p> {this.props.name}</p>
    </div>
)
    }
} 


still not able to figure out

{This.props.name} should be within the strong tag

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.