Essay record
React/JSX/HTML: How to put a greater-than or less-than symbol in React/JSX/HTML
- Record
- Essay / / 1 min read / 92 words
On this page3 sections / +
DISCLOSURE: Some links may be affiliate links. Details
problem
I'm building a web page in React / JSX and need to put a greater-than (>) and less-than (<) symbol in my page. How can I do this without the page breaking?
solution
You can wrap your symbols in a code block and insert them as a string!
Example:
<div>{"<"} Less than, {">"} greater than </div>
did this help?
I regularly post about tech topics I run into. You can get a periodic email containing updates on new posts and things I've built by subscribing here.