美文网首页React
React(特殊数据渲染)

React(特殊数据渲染)

作者: 余生筑 | 来源:发表于2017-10-14 21:38 被阅读9次
    • {数字}
    render() {
            return (
                <div>
                {66}
                </div>
                );
            } 
        }
    
    66.png
    • {字符串}
    render() {
            return (
                <div>
                {"hello"}
                </div>
                );
            } 
        }
    
    hello.png
    • {false},{null},{undefined}
    render() {
            return (
                <div>
                {false}
                {null}
                {undefined}
                </div>
                );
            } 
        }
    

    结果为空白,不输出内容

    相关文章

      网友评论

        本文标题:React(特殊数据渲染)

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