I need help on this lesson Access Props Using this.props

I need help on this lesson Access Props Using this.props
0

I just don;t know how to do this. I need a solution how this goes about. I have no idea what to do here. I am completely lost. I have been on this lesson for the past hour trying many different things but cannot get any where.

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

  }
  render() {
    return (
        <div>
            { /* change code below this line */ }
            
            <p>Your temporary password is: <strong></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 */ }

          { /* change code above this line */ }
        </div>
    );
  }
};

The lesson you are on is teaching you about how to access props within a child components which has been passed to it from a parent component.
So you first have to render an instance of ReturnTempPassword within the ResetPassword component, then pass tempPassword as a prop to ReturnTempPassword. then after you can access the tempPassword from the ReturnTempPassword with this.props.tempPassword from the ReturnTempPassword component.

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={"cskcnnhfk"} />
          { /* change code above this line */ }
        </div>
    );
  }
};