Skip to content

Commit ed45353

Browse files
committed
edits
1 parent 19b46ad commit ed45353

File tree

2 files changed

+13
-32
lines changed

2 files changed

+13
-32
lines changed

lesson1.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ <h1>Properties</h1>
150150
</div>
151151
</section>
152152
<section class="container">
153-
<h1>State</h1>
153+
<h1>State &amp; Events</h1>
154154
<div class="row">
155155
<div class="col-sm-4">
156156
<ul>

lesson3.html

Lines changed: 12 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -80,31 +80,6 @@ <h3>Chat Connection ({this.props.channel})</h3>
8080
);
8181
FuseSessionChats("chat1", "chat2")
8282
</script>
83-
<script type="text/jsx" id="ajaxSource">
84-
/** @jsx React.DOM */
85-
var UberTag = React.createClass({
86-
//document that we take a prefix property, validates.
87-
//
88-
propTypes: {
89-
prefix: React.PropTypes.renderable
90-
},
91-
getDefaultProps: function() {
92-
return {
93-
prefix: "Hello"
94-
}
95-
},
96-
render: function() {
97-
return <p>
98-
<span>{this.props.prefix} </span>
99-
{this.props.children}
100-
</p>;
101-
}
102-
});
103-
React.renderComponent(
104-
<UberTag prefix="Greetings">John Smith</UberTag>,
105-
document.getElementById('ajax')
106-
);
107-
</script>
10883
<script type="text/jsx" id="routesSource">
10984
/** @jsx React.DOM */
11085
var UberTag = React.createClass({
@@ -145,6 +120,8 @@ <h1>Messages</h1>
145120
<li>Use channels (aka pub/sub) to send messages to other components and systems</li>
146121
<li>Subscribe to a topic on a channel to be notified of events</li>
147122
<li>Your component is an Actor</li>
123+
<li>Subscribe to topics in "componentWillMount"</li>
124+
<li>Unsubscribe from topics in "componentWillUnmount"</li>
148125
</ul>
149126
<div class="result" id="useMessage"></div>
150127
</div>
@@ -154,16 +131,20 @@ <h1>Messages</h1>
154131
</div>
155132
</section>
156133
<section class="container">
157-
<h1>Models</h1>
134+
<h1>Ajax &amp; Model Layer</h1>
158135
<div class="row">
159-
<div class="col-sm-4">
136+
<div class="col-sm-12">
137+
<p> Due to time constraints and lack of good public cross origin APIs the example for this has been skipped </p>
138+
<p>
139+
If components are editing data on a server then it is recommended that you use a model layer.
140+
It is recommended that you use messages to integrate React.js with the model layer.
141+
React.js doesn't care what is being used for the model layer or if AJAX is directly called as long as updates are pushed through "setState".
142+
</p>
160143
<ul>
144+
<li>Choose your data backend</li>
161145
<li>Bind to your model layer using messages</li>
146+
<li>Ajax requests are messages made to the internet</li>
162147
</ul>
163-
<div class="result" id="ajax"></div>
164-
</div>
165-
<div class="col-sm-8">
166-
<div class="sourceCode" data-source="ajaxSource" data-edit="true"></div>
167148
</div>
168149
</div>
169150
</section>

0 commit comments

Comments
 (0)