Access Props Using this.props React

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

This code can’t seem to pass the last check.

  **Your code so far**

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

}
render() {
  return (
      <div>
          { /* Change code below this line */ }
          <p>Your temporary password is: <strong> {this.props.tempPassword} </strong></p>
          { /* Change code above this line */ }
      </div>
  );
}
};

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

}
render() {
  return (
      <div>
        <h2>Reset Password</h2>
        <h3>We've generated a new temporary password for you.</h3>
        <h3>Please reset this password from your account settings ASAP.</h3>
        { /* Change code below this line */ }
        <ReturnTempPassword tempPassword="ABCD1234QASW" />
        { /* Change code above this line */ }
      </div>
  );
}
};
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:90.0) Gecko/20100101 Firefox/90.0

Challenge: Access Props Using this.props

Link to the challenge:

This line:

<p>Your temporary password is: <strong> {this.props.tempPassword} </strong></p>

You’ve added spaces. That space after <strong> and the space before </strong>? Those will show up in the answer. Since there is also a space on the other side of each of those that means 2 spaces on each side of your password. I’m guessing the test is only expecting one because when I remove the extra ones, the test passes.

1 Like

It worked when I removed spaces between strong tags, thank you so much!

1 Like

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