[英]How to use the "< >" in React JSX
You would need to use HTML entities您需要使用HTML 实体
Reserved characters in HTML must be replaced with character entities.
HTML 中的保留字符必须替换为字符实体。
Result![]() |
Description![]() |
Entity Name![]() |
Entity Number![]() |
---|---|---|---|
< ![]() |
less than![]() |
< |
< |
> ![]() |
greater than![]() |
> |
> |
HTML HTML
<div className="left-column"><Lorenzo Codes
You could do something like:您可以执行以下操作:
<div className="left-column">{'<Lorenzo Codes'}
<div>{"<"} {">"} </div>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.