Legend123
Legend123

Reputation: 378

How do you unescape '\' in JSX template literal?

<pre>{`
   I want to be formatted with
 \
   in the text
`}</pre>

How do I get '\' to appear in the text?

Upvotes: 1

Views: 57

Answers (1)

James
James

Reputation: 5747

You just add another backslash \\

Upvotes: 1

Related Questions