In React JSX how can I have the following text include a single quote? Or other punctuation that might need escaping?
return (<p>I've seen the movie.</p>)
Render as a JS string literal (with double-quotes):
return (<p>{"I've seen the movie."}</p>)
... or use the HTML entity for an apostrophe, ':
'
return (<p>I've seen the movie.</p>)
2.1m questions
2.1m answers
60 comments
57.0k users