Render a Class Component to the DOM error

Tell us what’s happening:
Error: Cannot read property ‘innerHTML’ of undefined

Your code so far

class TypesOfFood extends React.Component {
  constructor(props) {
  render() {
    return (
        <h1>Types of Food:</h1>
        {/* change code below this line */}
        {/* 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:

You have the wrong syntax in the ReactDOM.render function. For classes, the syntax is:

ReactDOM.render(<ClassName />,document.getElementById('challenge-node'));

where ClassName is the name you have chosen for the class.

Hope this helps :slight_smile: