我正在编写以下代码,但显示空白页。
var hello = React.createClass({render : function(){return <div><h1> Hi<h1/</div>;}});React.render(new hello(),document.body);
However this should help you get going:
var Hello = React.createClass({
render: function(){
return <p>Hi</p> ;
}
});
React.render(<Hello />, document.body);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.