The state of StatefulComponent should be initialized with a property firstName set to a string.
The property firstName in the state of StatefulComponent should render in the h1 element.
I keep getting this errors don’t know whats going on
**Your code so far**
class StatefulComponent extends React.Component {
constructor(props) {
super(props);
this.state = {
firstname : "Hello!"
}
}
render() {
return (
<div>
<h1>{this.state.firstname}</h1>
</div>
);
}
}
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0
Challenge: React - Create a Stateful Component
Link to the challenge: