Help with React :Writing a component

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) {
  render() {
    return (
      <h1>My First React Component!</h1>

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:

You’re not crazy. You will need to wrap the <h1> in a <div> but it should render without.

1 Like

Try to replace MyComponent with

<MyComponent />

inside the call to ReactDOM.render()

1 Like

I totally forgot about that!