Skip to content

Commit d85b5b6

Browse files
committed
add sanbox notes
1 parent 5260713 commit d85b5b6

File tree

4 files changed

+46
-20
lines changed

4 files changed

+46
-20
lines changed

basic.html

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<html>
2+
<head>
3+
<title>Hello World</title>
4+
<link href="lib/bootstrap.css" rel="stylesheet" />
5+
<script src="lib/react.js"></script>
6+
<script src="lib/JSXTransformer.js"></script>
7+
<script type="text/jsx" id="defineRenderSource">
8+
/** @jsx React.DOM */
9+
var UberTag = React.createClass({
10+
render: function() {
11+
return <h3>{this.props.children}</h3>;
12+
}
13+
});
14+
15+
React.renderComponent(
16+
<UberTag>Hello World</UberTag>,
17+
document.getElementById('defineRender')
18+
);
19+
</script>
20+
21+
</head>
22+
<body>
23+
<section class="container">
24+
<div class="result" id="defineRender"></div>
25+
</section>
26+
</body>
27+
</html>

lesson1.html

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@
1616
<script type="text/plain" id="jsxTanslatedSyntaxSource">
1717
React.DOM.tagname(properties, children)
1818
</script>
19-
<script type="text/plain" id="defineTagSource">
20-
/** @jsx React.DOM */
21-
var UberTag = React.createClass({});
22-
var uberInstance = <UberTag/>;
23-
</script>
2419
<script type="text/jsx" id="defineRenderSource">
2520
/** @jsx React.DOM */
2621
var UberTag = React.createClass({
@@ -84,6 +79,16 @@
8479
</script>
8580
</head>
8681
<body>
82+
<section class="container">
83+
<h1>Your Sanbox</h1>
84+
<div class="row">
85+
<div class="col-sm-12">
86+
<p>
87+
Most of the code on the pages is live editable. An explanation for how the code viewer works is at the end of lesson 2. "basic.html" has been created for you so that you can experiment in creating your own components in an environment that is already setup.
88+
</p>
89+
</div>
90+
</div>
91+
</section>
8792
<section class="container">
8893
<h1>Application as a hierarchy of components</h1>
8994
<div class="row">

outline.txt

Lines changed: 0 additions & 15 deletions
This file was deleted.

readme.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Crash Course for React.js
2+
=========================
3+
4+
# Clone or download this respository
5+
# Open lesson1.html in your browser
6+
# Enjoy
7+
8+
9+
Got ideas for improvements? Fork me.

0 commit comments

Comments
 (0)