I was trying out a solution for the challenge: Create a Component with Compostion, and when I tried to test it, my browser (Google Chrome) crashed. I logged back out an back in and still cannot even load the challenge now without my browser crashing. I tried a different browser (Microsoft Edge) and the solution did the same thing, except this time it slowed down my whole computer for a moment. I skipped ahead and have the same problem with: Compose React Components! Can someone tell me what I am doing wrong?
my code below for Create a Component with Composition:
1 const ChildComponent = () => {
2 return (
3 <div>
4 <p>I am the child</p>
5 </div>
6 );
7 };
8
9 class ParentComponent extends React.Component {
10 constructor(props) {
11 super(props);
12 }
13 render() {
14 return (
15 <div>
16 <h1>I am the parent</h1>
17 { /* change code below this line */ }
18 <ParentComponent>
19 <ChildComponent />
20 </ParentComponent>
21
22 { /* change code above this line */ }
23 </div>
24 );
25 }
26 };