Skip to content

Commit d9931da

Browse files
author
Matt Calthrop
committed
Add tutorial1
1 parent fb80cb5 commit d9931da

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

public/index.html

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@
1313
</head>
1414
<body>
1515
<div id="content"></div>
16-
<script type="text/babel" src="scripts/example.js"></script>
17-
<script type="text/babel">
18-
// To get started with this tutorial running your own code, simply remove
19-
// the script tag loading scripts/example.js and start writing code here.
20-
</script>
16+
<!--<script type="text/babel" src="scripts/example.js"></script>-->
17+
<script type="text/babel" src="scripts/tutorial1.js"></script>
2118
</body>
2219
</html>

public/scripts/tutorial1.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/* global React, ReactDOM */
2+
3+
var CommentBox = React.createClass({
4+
render: function () {
5+
return (
6+
<div className="commentBox">
7+
Hello, world! I am a CommentBox.
8+
</div>
9+
);
10+
}
11+
});
12+
13+
ReactDOM.render(
14+
<CommentBox />,
15+
document.getElementById('content')
16+
);

0 commit comments

Comments
 (0)