Write a React Component from Scratch

Write a React Component from Scratch
0.0 0


Tell us what’s happening:

Your code so far

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


Your browser information:

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

Link to the challenge:



Here is the error, do you know how to fix it?


I know what is wrong with the above… or at least one item. I am currently stuck this problem too, but I feel like my answer is right…


My answer does not get a “correct” mark on the final test but I think it is an improvement over yours since it uses document.getElementById(). @Layer - do you know what is wrong with mine?

class MyComponent extends React.Component{

My First React Component!


ReactDOM.render(MyComponent, document.getElementById(‘challenge-node’));


I was missing the html < /> tags in mine… “reactDom.render(, document.getElement…”