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](https://madscientists.co/wp-content/uploads/2018/02/noCommentsAllowed.png)](https://madscientists.co/wp-content/uploads/2018/02/noCommentsAllowed.png)
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](https://madscientists.co/wp-content/uploads/2018/02/noCommentsButJSAllowed-300x48.png)](https://madscientists.co/wp-content/uploads/2018/02/noCommentsButJSAllowed.png)
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.