Children of components to do not get rendered

Everything between the EducationHeader component’s opening and closing tag will be passed to the EducationHeader component as a children property on the props object.

So to render the EducationItem components, you need to render props.children in the EducationHeader component.

function EducationHeader({ name, children }) {
  return (
    <div>
     <h2>{name}</h2>
     { children }
    </div>
  );
}

For details, see: React - props.children

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top