Render a Class Component to the DOM: GotBug?

Tell us what’s happening:

This is correct, but being told that the div tag Id is not targeted, which it is and correctly

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/>, document.getElementById('challenge-node'))

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:69.0) Gecko/20100101 Firefox/69.0.

Link to the challenge:
https://learn.freecodecamp.org/front-end-libraries/react/render-a-class-component-to-the-dom

The error message is misleading, you just have to put the two components on separate lines.

{/* change code below this line */}
  <Fruits />
  <Vegetables />
{/* change code above this line */}

Edit: Actually it looks like it is the space between the two components that is causing the test to fail.

This would pass as well.

{/* change code below this line */}
  <Fruits /><Vegetables />
{/* change code above this line */}