React challenge: Render a Class Component to the DOM

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) {
  render() {
    return (
        <h1>Types of Food:</h1>
        {/* change code below this line */}
        <Fruits />
        <Vegetables />
        {/* change code above this line */}
// change code below this line
ReactDOM.render(TypesOfFood, document.getElementById("challenge-node"));

the link is here:

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!!

You are missing a few characters on the last line. Go to the instructions and look at the pseudocode, especially around TypesOfFood.

1 Like

Ah, I got it.
I wrapped the TypesOfFood within<TypesOfFood />, and it’s done!
Thank you for your hint!