我有一个非常简单的设置,无法使用Reactive0.13.1运行:
var TheApp = React.createClass({
render: function() {
return (
React.createElement("div", null)
)
}
})
React.render(
React.createElement(React.createFactory(TheApp)),
document.getElementById('example')
)我得到“未定义的TypeError:无法读取未定义的属性'mountComponent‘”
我读过React 0.13中的变化,但我不明白为什么这不应该起作用。
JSBIN:http://jsbin.com/kepihamabi
发布于 2015-04-12 16:29:59
React.render(
React.createElement(React.createFactory(TheApp)),
document.getElementById('example')
)应该是
React.render(
React.createFactory(TheApp)(),
document.getElementById('example')
)https://stackoverflow.com/questions/29591686
复制相似问题