kev kev - 1 year ago 203
React JSX Question

react-text comments causes invisible line

React Comments like:

`<!-- react-text: 3 -->
<!-- /react-text -->`

get rendered as empty line messing up with the design. Is there any way to prevent this from happening?

Edit: there is
between the opening and closing tags. It's not visible in the code above but in the fiddle. I copy pasted both from vim (see screenshot).

enter image description here

Answer Source

React has added that block because an empty element was rendered. To remove it you will have to see where that empty element is generated. It is likely it is from an empty string - they can cause these seemingly unnecessary react comment blocks.

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