Create a Stateless Functional Component

Tell us what’s happening:

// running test
Cannot read property ‘rendered’ of undefined
Cannot read property ‘rendered’ of undefined
Cannot read property ‘rendered’ of undefined
// tests completed

Your code so far


const MyComponent = function() {
  // change code below this line

  return <div>Hello world!!!</div>

  // change code above this line
}

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36.

Link to the challenge:

React - Create a React Component challenge. (this is also not working)

Challenge:
_MyComponent is defined in the code editor using class syntax. Finish writing the render method so it returns a div element that contains an h1 with the text Hello React!

._

Code:

class MyComponent extends React.Component {
  constructor(props) {
    super(props);
  }
  render() {
    // change code below this line

    return(
      <div>
        <h1>Hello React!</h1>
      </div>
    );

    // change code above this line
  }
};
// running test
Enzyme Internal Error: unknown composite type undefined
Enzyme Internal Error: unknown composite type undefined
Enzyme Internal Error: unknown composite type undefined
// tests completed

I think, the problem is with browser session and net disconnect. Now it’s working fine.