user3900456 user3900456 - 7 months ago 76
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?


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.