Create a Complex JSX Element: Corrected

Create a Complex JSX Element: Corrected
0.0 0

#1

Tell us what’s happening:

I’m sorry, this lesson is remarkably unhelpful. What am I supposed to do here? I added the closing tags and that removed the red error lines.

Error: Cannot read property ‘type’ of undefined

Your code so far


// write your code here
const JSX = (
    <div>
      <h1>
       <p>
        <ul>
        <li>first</li>
        <li>second</li>
        <li>third</li>
        </ul>
      </p>
     </h1>
    </div>
);

Your browser information:

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

Link to the challenge:
https://learn.freecodecamp.org/front-end-libraries/react/create-a-complex-jsx-element


#2

You have to return the div.
Const jsx = return(…);


#3

Thanks for the reply

Is that the structure? Ok. I tried it again this time just filling in random words for the sections and that got it to work

const JSX = (
    <div>
      <h1>A list of things</h1>
       <p>Here it goes</p>
        <ul>
        <li>first</li>
        <li>second</li>
        <li>third</li>
        </ul>
      
     
    </div>
);

The return was not required