Tell us what’s happening:
I’m pretty sure my code is correct, but it doesn’t render to the DOM.
Please help!!
Your code so far
// change code below this line
class MyComponent extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<h1>My First React Component!</h1>
);
}
};
ReactDOM.render(MyComponent,document.getElementById('challenge-node'));
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/front-end-libraries/react/write-a-react-component-from-scratch