Hi, I’m really confused about the line inside the render method and before the return statement, is that a JS code or JSX code? because he accepts the HTML tags,
Thank you
Your code so far
class MyComponent extends React.Component {
constructor(props) {
super(props);
this.state = {
name: 'freeCodeCamp'
}
}
render() {
// change code below this line
const name=<h2>this.state.name</h2>;
// change code above this line
return (
<div>
{ /* change code below this line */ }
{name}
{ /* change code above this line */ }
</div>
);
}
};
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36
.
Challenge: Render State in the User Interface Another Way
Link to the challenge:
https://www.freecodecamp.org/learn/front-end-libraries/react/render-state-in-the-user-interface-another-way