React - Create a Stateful Component

Tell us what’s happening:
Describe your issue in detail here.

Your code so far

class StatefulComponent extends React.Component {
constructor(props) {
  // Only change code below this line
  this.state = {
    name: 'Useful Programmer'
  // Only change code above this line
render() {
  return (

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Challenge: React - Create a Stateful Component

Link to the challenge:

You didn’t indicate what problem you are having… but assuming you’re just wondering why your code isn’t passing, check the variable name in your state and see if it matches what they told you to make it.

compiler is showing me error like this ----> The state of


should be initialized with a property


set to a string. The property


in the state of


should render in the



and I worked and edit y code as according to compiler error which it was showing to me but after that it was also not working , can you please try in your directory and help me to find the solution

Well, looking at your code above you did create a state:

this.state = {
    name: 'Useful Programmer'

… and what did you call the property inside that state?

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