Can someone please help me with this, I can not figure out how to do anything on this

class App 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>

  );

}

};

Access Props Using this.props

It seems like everyone else who has done this lesson has a different version than the one I am doing, can someone please help me with this.

This is the correct way to pass in a prop, but nowhere in your code is a class (or function) component of ReturnTempPassword.

This is the correct way to access props in a class component, however p is not a class component.

It might be easier to help with a link to the challenge. The link you have is to a challenge about accessing props in a class component but not the code you have.

1 Like

Hi @hollidahayden !

Welcome to the forum!

The challenge has changed.
So if you are looking at previous posts then it is incorrect.

I have also updated the solution in the guide.

1 Like

Thank you so much for the help, I really had a tough time with this one thank you again.