React - Add Comments in JSX

Tell us what’s happening:
Always Getting Invalid Comment Error.

Your code so far

const JSX = 
  
  <div>
    <h1>This is a block of JSX</h1>
    <p>Here's a subtitle</p>
  </div>
{/* */}

Your browser information:

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

Challenge: React - Add Comments in JSX

Link to the challenge:

Compare the originally starting code (below) with yours:

const JSX = (
  <div>
    <h1>This is a block of JSX</h1>
    <p>Here's a subtitle</p>
  </div>
);

See something missing in your code that is present in the original code?

Also, make sure you read the instructions about where to place the comment. Currently, it is not in a valid location according to the instructions.

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