React - Write a React Component from Scratch

hey guys been a bit… finally stumped again …
any hint without getting anywhere NEEEAAR the answer
i believe i am starting to believe me when i believe i am close…

… and i DO believe I am close :grinning: :face_with_diagonal_mouth:
:woozy_face: :brain::woozy_face:
:blush: :facepunch:

Your code so far


class  MyComponent extends React.Component{
  constructor(props) {
    super(props);
  }
  render() {
    return (
    <div id = "challenge-node"> 
    <h1> My First React Component!</h1>
    </div>
    );

  };
}
ReactDOM.render(MyComponent , document.getElementById("challenge-node"))

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/114.0

Challenge: React - Write a React Component from Scratch

Link to the challenge:

You are really close!

Just remember, the h1 tag displays exactly what is inside of it, does it match the test exactly?

And the second problem is in your ReactDOM.render method call, it’s missing something.

I hope that helps!

1 Like

:man_superhero::facepunch: :+1:
thanks :mortar_board:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.