Create a React Component : exercice / code

My code seems to be good but the RUN test does not pass

   **Your code so far**

class MyComponent extends React.Component {
 constructor(props) {
   super(props);
 }
 render() {
   // Change code below this line
     return (
<div className='myDiv'>
   <h1>Hello React!</h1>
 </div>
     )
   // Change code above this line
 }
};
   **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:93.0) Gecko/20100101 Firefox/93.0

Challenge: Create a React Component

Link to the challenge:

You are running into some quirks with the test code. If you remove the class you placed on the div it will pass. In general, you should only do exactly what the instructions ask and do not change or add anything extra because the tests aren’t always expecting it and it will cause you to fail.

1 Like