Write a React Component from Scratch?

Tell us what’s happening:
Page won’t render

Your code so far

// change code below this line
class MyComponent extends React.Component {
    constructor(props) {
    render() {
        return (
                <h1>My First React Component!</h1>

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

<div id='challenge-node'></div>

Your browser information:

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

Link to the challenge:

The ReactDOM.render() call can’t be inside the component it’s trying to render.

1 Like

That was it, thanks mathic