Create a Component with Composition page crash

Tell us what’s happening:
The page is crashing after i type closing tag

Your code so far


const ChildComponent = () => {
  return (
    <div>
      <p>I am the child</p>
    </div>
  );
};

class ParentComponent extends React.Component {
  constructor(props) {
    super(props);
  }
  render() {
    return (
      <div>
        <h1>I am the parent</h1>
        { /* change code below this line */ }


        { /* 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/74.0.3729.157 Safari/537.36.

Link to the challenge:

@muzhaqi16 Which closing tag?

The ParentComponent as soon as you close it.

Where are you writing ParentComponent within the code? It is already defined as a class. There is no need to reference it anywhere else for this challenge.

Oh ok got it. I don’t know why i was writing. Got it. It works now. Thank you

1 Like