I’m in this part :
React: Use React to Render Nested Components
here’s my code
const TypesOfFruit = () => {
return (
<div>
<h2>Good ELEMENT</h2>
<ul>
<li>LIST 1</li>
<li>LIST 2</li>
</ul>
</div>
);
};
const Fruits = () => {
return (<TypesOfFruit />);
};
class TypesOfFood extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
<div></div>
<Fruits />
</div>
);
}
};
there’s only 2 points accepted from 4
I’m sure my code is fine and all 4 points should be accepted
Passed:
The TypesOfFood component should return a single div element.
The TypesOfFood component should return the Fruits component.
Not Passed:
The Fruits component should return the TypesOfFruit component.
The TypesOfFruit component should return the h2 and ul elements.