如何使用"<>>在 React JSX 中 [英] How to use the "< >" in React JSX
本文介绍了如何使用"<>>在 React JSX 中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用 <和 >作为 React 中的文本?我想将它用于我的投资组合?
解决方案
您需要使用 HTML 实体
<块引用>HTML 中的保留字符必须替换为字符实体.
结果 | 说明 | 实体名称 | 实体编号 |
---|---|---|---|
< | 小于 | < | < |
> | 大于 | > | > |
HTML
<Lorenzo CodesHow can I use the < and > as text in React? I am trying to use it for my portfolio?
解决方案 You would need to use HTML entities
Reserved characters in HTML must be replaced with character entities.
Result
Description
Entity Name
Entity Number
<
less than
<
<
>
greater than
>
>
HTML
<div className="left-column"><Lorenzo Codes
这篇关于如何使用"<>>在 React JSX 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文