Render a Class Component to the DOM (Error)

Render a Class Component to the DOM (Error)


Tell us what’s happening:

My solution doesn’t work, but it appears to be the same one as in this youtube video:

I’ve been stuck on this challenge for about 50 minutes.

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

Your browser information:

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

Link to the challenge:


@Miguel319 Please, show us a screnshoot. What do you get? :thinking:
Which item does not allow you to pass the challenge?



@Miguel319 Try ReactDOM instead of ReactDom here:

ReactDom.render(<TypesOfFood />, document.getElementById('challenge-node'));



I’m starting to think that this is a bug. I tried it on both of my computers and it hasn’t worked.


It just doesn’t work!


@Miguel319 I copied and pasted your code, changed ReactDom to ReactDOM, and it passed all the tests. Can you try refreshing the page, maybe resetting the challenge, or using another browser?



OMG! It worked! I just $(^ love u! I really appreciate it!