Trouble with "React: Render a Class Component to the DOM"

Hey all. My code is the following:

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 />, 'challenge-node');

Fruits, Vegetables, and ‘challenge-node’ are all supposed to be defined “behind the scenes” but I keep getting minified error #200, which says “target container is not a DOM element.” Am I missing something here?

try using

1 Like

try adding document. to your call to getElementByid.

ex: document.getElementById('challenge-node'));