美文网首页
react render null

react render null

作者: peerben | 来源:发表于2019-04-26 09:38 被阅读0次

booleans (true/false), null, and undefined are valid children, they will be Ignored means they simply don’t render.

All these JSX expressions will render to the same thing:

<div />

<div></div>

<div>{false}</div>

<div>{null}</div>

<div>{undefined}</div>

<div>{true}</div>

相关文章

网友评论

      本文标题:react render null

      本文链接:https://www.haomeiwen.com/subject/nenxnqtx.html