Categories
React Answers

How to render curly braces as plain text in React or JSX?

Spread the love

To render curly braces as plain text in React or JSX, we can render them in a string.

For instance, we write

return (<p>{"{{}}"}</p>)

to render curly braces by putting them all in a string.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *