Render State in the User Interface and other challenges

This post is not specific to the following error that I received but in general; Why there are no answers to the challenges, how a beginner having difficulties running the challenges know where s/he went wrong? the creators of this site don’t expect the users to post every non-working challenge to the forum, do they?

class MyComponent extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      name: 'freeCodeCamp'
    }
  }
  render() {
    return (
      <div>
        <h1>{this.state}</h1>
      </div>
    );
  }
};

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/front-end-libraries/react/render-state-in-the-user-interface

Well firstly, what is wrong with the above code?

And secondly, it is very convenient for learner to have sample answers provided for them as an option after number of failed tries.

Regards

Thank you very much for your prompt replays, I am really grateful for everyone involved in the FCC project, I just wanted to give a suggestion to improve the experience, I gather from your first reply that this forum is solely for question related to codes,
Thank you again and have a nice day.

So the second part of my post was relevant, Why you left it off? Again I appreciate your help and you solved my issue but I know that asking for help in the programming world is a skill to be acquired so I follow up with this message.

“Why there are no answers to the challenges” like answer templates for reference provided in the curriculum, I think it will be very helpful

The hints section is still being developed, so some of the challenges do not have extra information or solutions. The entire curriculum has been created by volunteers, so it takes time for all the hint sections to be written. I suspect the Guide will have most of the hint sections complete in the next couple of months.

In the mean time, you have the forum (which is made up of other campers and moderators (also volunteers) who can try to answer your questions.

1 Like