2
我是新來的反應,我寫了下面的代碼,並得到ReactDOM.render預計最後的備選`callback`參數是一個函數
ReactDOM.render Expected the last optional `callback` argument to be a function. `Instead received: Object`
這是我的代碼
var Stats = React.createClass({
render: function() {
return (
<article className="col-md-4">
<article className="well">
<h3>{this.props.value}</h3>
<p>{this.props.label}</p>
</article>
</article>
)
}
});
ReactDOM.render(
<Stats value={"255.5K"} label={"People engaged"}/>,
<Stats value={"5K"} label={"Alerts"}/>,
<Stats value={"205K"} label={"Investment"}/>,
document.getElementById('stats')
);
什麼我做錯了嗎?