Is there a way to insert an HTML comment node in React JSX, in the same way you might insert a component or DOM node?
E.g., something like:
React.createElement(Comment, {}, "comment text");
Would render to:
<!-- comment text -->
The idea is that the comment be visible on the page, so { /* this /* }
doesn't answer my question.
Note that the following related question doesn't have an answer and asks for something somewhat different:
How to render a HTML comment in React?
I just want to render a single comment node. I notice that React infrastructure renders HTML comments on its own, so perhaps there is a (slightly hacky?) way to do it too.