Place a note


#1

Hello I would like to know how to place a note in jsx.
such as it is in js. // or /* */

Thanks


#2

Please link to the exact exercise so we are all on the same page as you.

JSX content is HTML, so within the HTML a <!-- --> comment should be valid. Be sure it is inside the wrapper DIV and not before it. That would be my guess, without testing.

Just checked, the above is wrong.

You can’t just use HTML comments inside of JSX because it thinks they are real DOM Nodes:

http://wesbos.com/react-jsx-comments/


#3

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