Render State in the User Interface prob

Render State in the User Interface prob
0.0 0

#1

Tell us what’s happening:
I can’t pass the test
“The rendered h1 header should contain text rendered from the component’s state.”
despite the title showing at the right window. Is it my code or an issue?

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 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.62 Safari/537.36.

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


#2

It worked without spaces… weird
< h1 >{this.state.name}< /h1 >