I think I am doing it right, but the console says:
Cannot read property 'innerHTML' of undefined
this is the code I filled in:
class TypesOfFood extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
<h1>Types of Food:</h1>
{/* change code below this line */}
<Fruits />
<Vegetables />
{/* change code above this line */}
</div>
);
}
};
// change code below this line
ReactDOM.render(TypesOfFood, document.getElementById("challenge-node"));
the link is here: https://learn.freecodecamp.org/front-end-libraries/react/render-a-class-component-to-the-dom
I do think this challenge is a easy one, but I just don’t get it why the error shows up. Please drop a hint, thanks!!