Tell us what’s happening:
Describe your issue in detail here.
I have tried to get this challenge right and always come up with the same error!
The error I am getting is
// tests completed
// console output
Uncaught ReferenceError: ReactDom is not defined
act(…) is not supported in production builds of React, and might not behave as expected.
[TypeError: Cannot read properties of undefined (reading ‘innerHTML’)]
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("challenge-node"));
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("challenge-node"));
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0
Challenge Information:
React - Render a Class Component to the DOM