Access Props Using this.props help please

Tell us what’s happening:
I do not know what to do at the bottom of the code, the 2nd “Change code below this line” portion. When I try to do the browser keeps freezing. Thanks in advance.

  **Your code so far**

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

}
render() {
  return (
      <div>
          { /* Change code below this line */ }
          <ReturnTempPassword tempPassword="thisihifjdfoadjfoi" />
          <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 */ }
        {this.props.tempPassword};
        { /* 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/88.0.4324.190 Safari/537.36.

Challenge: Access Props Using this.props

Link to the challenge:

you have the elements flipped. You try to render ReturnTempPassword within itself. You must render it inside ResetPassword.

Hi @jae.han08 !

Welcome to the forum!

I would suggest also looking at the react docs for more examples.

I think they give good explanations and they provide links for codepen examples so you can experiment with the code.

Hope that helps!

Ahh got it now, thank you!

Ahh ok, got it thanks for the help!

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