user3900456 user3900456 - 1 year ago 158
React JSX Question

How to stop React from rendering comments

When I inspect the markup rendered by react on the server, I see a lot of comments like:

<!-- /react-text --><!-- react-text: 28 --><!-- /react-text -->

How do I make react stop rendering them?

Answer Source

You can't. Those are needed for React to do its job as far as knowing how to remove/replace items in the DOM. This is an improvement over the previous way React did things, which was data-reactid attributes everywhere.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download