Render a Class Component to the DOM Please

Dont Know whATS HAPPENING

Your code so far



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 />,'challenge-node')

Hi @Ashraf2 ,

You have to use document.getElementById to select the div with id challenge-node while rendering <TypesOfFood /> to the DOM.

Refer this link for more info: https://reactjs.org/docs/rendering-elements.html

And you have to nest the <Fruit /> and <Vegetable /> with div. OKAY ; )