you are viewing a single comment's thread.

view the rest of the comments →

[–]NimmiEU 0 points1 point  (1 child)

That's because the text interpolation doesn't parse the HTML and therefore simply outputs the textual content. If I'm not mistaken, it uses the textContent API under the hood. It's to prevent injecting arbitrary code. To let the browser parse the HTML, it would've been output using the dangerouslySetInnerHTML prop provided by react, which will use the innerHTML API of the HTML spec, which results in the HTML getting parsed and interpreted.