Rendering class to DOM


class TypesOfFood extends React.Component {  
constructor(props){   
 super(props);
  } 
 render() {   
  return (   
   <div>
        <h1>Types of Food:</h1>        
             <Fruits /> 
             <Vegetables />   
  </div>    
); 
 }
};
// change code below this line
ReactDOM.render(<TypesOfFood />, document.getElementById('challange-node'));

Please don’t just post code and not tell not give us a link to the challenge or not ask any questions. We don’t know what your question is or what challenge this is for? It is best to use the Ask for Help button on the challenge, because it will auto-populate the challenge url and all of your code.

it’s showing the error

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("challange-node"));

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0.

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

You have a typo. It’s challenge-node, not challange-node

You may need to carefully check your code also typo mistake .

it's challenge-node Not challange-node.