PrimeLens PrimeLens - 9 days ago 5
Javascript Question

React JSX, how to render text with a single quote? Example <p>I've</p>

In React JSX how can I have the following text include a single quote? Or other punctuation that might need escaping?

return (
<div>
<p>I've seen the movie.</p>
</div>
)

Answer

Nevermind, it works as is.

It was the IDE that was highlighting it as a mistake

Comments