I don't get how to use Render

Tell us what’s happening:

Your code so far

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

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36.

Link to the challenge:

Use document.getElementById(‘challenge-node’) as your second argument instead of simply (‘challenge-node’)

First of all, @Tchoukoualeu should not have to tell you how to render a class component to the DOM. Where in the curriculum challenges have you see the syntax you are trying to use above. You need to go back the the 4th lesson in the React section to understand how to correctly render class components to the DOM (see link below).


Also, you have a typo. It is ‘challenge-node’ instead of ‘challenge-mode’.

1 Like