📌  相关文章
📜  React.createElement 传递道具 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:17.606000             🧑  作者: Mango

代码示例1
var Hello = React.createClass({
    render: function() {
        return 
Hello {this.props.user.name}
; } }); var props = { user: {name: "World"}}; React.render(React.createElement(Hello, props), document.getElementById('container'));