React.createElement: type should not be null or undefined. It should be a string (for DOM elements) or a ReactClass (for composite components).
(React.js ver.0.13)
var ListView = React.createClass({ render: function() { var items = this.props.data.map(function(item) { return ItemDelegate({key:item.id,data:item.id}); }.bind(this)); return (React.createElement('ul',null,items)); } }); var ItemDelegate = React.createFactory(ListViewChildren); var ListViewChildren = React.createClass({ render: function(){ return (React.createElement('li',{key: this.props.key,data: this.props.data})); } }); var Wrapper = React.createClass({ render: function() { return (React.createElement(ListView,{data: [/*some data*/]})); } }); React.render(React.createElement(Wrapper),document.body);
它是什么类型,在哪里声明类型必须被声明?我想这个概念有一个完全的误会,但在哪里?