React - Create a Component with Composition

Tell us what’s happening:
Describe your issue in detail here.
Whenever I write a code website got stuck and stop responding

  **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 (Linux; Android 12; V2130) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.88 Mobile Safari/537.36 OPR/68.3.3557.64528

Challenge: React - Create a Component with Composition

Link to the challenge:

put the childcomponent in the return of the parent.

i.e the parent component should return the childcomponent

what code did you write? what you showed looks like the challenge in its initial state

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