I wrote a simple comment box app in react js. The code is as follows:
<!DOCTYPE html>
<html>
<head>
<script src="https://fb.me/react-0.13.2.js"></script>
<script src="https://fb.me/JSXTransformer-0.13.2.js"></script>
<script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
</head>
<body>
<div id="example"></div>
<script type="text/jsx">
var CommentList = React.createClass({
render: function() {
return (
<div className="commentList">
Hello, world! I am a CommentList.
</div>
);
}
});
var CommentForm = React.createClass({
render: function() {
return (
<div className="commentForm">
Hello, world! I am a CommentForm.
</div>
);
}
});
</script>
</body>
</html>
When I opened that code in local server, I got a blank page. I even installed reactjs by using bower like this:
bower install --save react
But the result was same.
Why is it loading a blank page?