The Association of Mad Scientists

Apparently JSX doesn't allow HTML-style comments.

Just a quick note on JSX. It accepts most HTML tags, but not all of them. If you try to use the HTML <!– comment –> tag, you’ll discover this:

[![No Comments Allowed](](
At Least, Not HTML-Style Ones
That’s not as big of a deal as it looks, honest. We can instead just embed normal JavaScript into the JSX, and put a JavaScript comment into that!
[![Embedded JavaScript Comments Are Allowed](](
Embedded JavaScript Comments Are Allowed
It basically does the same thing, but with syntax JSX will understand. Don’t forget, when you’re working with a JSX file, it’s not *really* HTML, it just looks like it. You have to compile (transpile?) it out of JSX into the appropriate JavaScript equivalent. It’s a pretty nifty system if you have the time to read up on it.