React - Access Props Using this.props

Tell us what’s happening:
Hello everyone, I’m kinda stuck here, with this error. I checked on the forum and check the solution and I have the same code, not sure why I’m getting an error. Thank you :slight_smile:
I’m getting this error:

// running tests
The Welcome component should display the string you pass as the name prop within strong tags.
// tests completed

Your code so far

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

  }
  render() {
    return (
        <div>
            { /* Change code below this line */ }
            <Welcome name="Melisa" />
            { /* 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> {this.props.name}</strong>!</p>
          { /* Change code above this line */ }
        </div>
    );
  }
};

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36

Challenge: React - Access Props Using this.props

Link to the challenge:

Remove the space before {this.props.name}

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