DEV Community

Discussion on: ☢️ HTML Comment in React

 
iamandrewluca profile image
Andrei Luca • Edited

that will leak into the DOM instead of staying in my code

That was the point, I needed the comment to land in DOM. 🙂
This is useful when you need something like IE/MSO conditional comments

<!--[if condition]>
(HTML to use if condition is true)
<![endif]-->
Enter fullscreen mode Exit fullscreen mode

Some comments have been hidden by the post's author - find out more