Render State in the User Interface

Render State in the User Interface
0.0 0

#1

Tell us what’s happening:

Is this a bug or mistake? In the preview the state name is being rendered, but the third condition for the challlenge to be completed, “The rendered h1 header should contain text rendered from the component’s state” is still not being satisfied.

Your code so far


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

Your browser information:

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

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


#2

Same here! In console displays “this.updater.enqueueCallback is not a function”.


#3

Looks like a bug to me, please consider submitting an issue here:

edit: NVM , I see that the issue has been already submitted.


#4

Thanks! I should have checked the GitHub.


#5

Had the same issue with this.updater.enqueueCallback is not a function. Thanks for submitting the issue.