React - Render State in the User Interface

I thought I got this challenge right. It even looks just like the solution, but I am getting the following error:

SyntaxError: unknown: Expected corresponding JSX closing tag for . (12:31)

10 |


11 | { /* Change code below this line */ }

12 | {this.state.name}
| ^
13 | { /* Change code above this line */ }
14 |


15 | );

  **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 */ }
        <hl>{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/104.0.0.0 Safari/537.36

Challenge: React - Render State in the User Interface

Link to the challenge:

You’ve written “hl” rather than “h1”

Thx. I don’t know how this happened.

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