Working on * React: Render State in the User Interface Another Way* module of React.
I made the changes in code by still it doesn’t accept the last test case. although i can see output. Unable to get the issue.
Please help.
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 = this.state.name;
// change code above this line
return (
<div>
{ /* change code below this line */ }
<h1> {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/85.0.4183.83 Safari/537.36
.
Challenge: Render State in the User Interface Another Way
Link to the challenge: