@@ -80,31 +80,6 @@ <h3>Chat Connection ({this.props.channel})</h3>
80
80
) ;
81
81
FuseSessionChats ( "chat1" , "chat2" )
82
82
</ 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 >
108
83
< script type ="text/jsx " id ="routesSource ">
109
84
/** @jsx React.DOM */
110
85
var UberTag = React . createClass ( {
@@ -145,6 +120,8 @@ <h1>Messages</h1>
145
120
< li > Use channels (aka pub/sub) to send messages to other components and systems</ li >
146
121
< li > Subscribe to a topic on a channel to be notified of events</ li >
147
122
< li > Your component is an Actor</ li >
123
+ < li > Subscribe to topics in "componentWillMount"</ li >
124
+ < li > Unsubscribe from topics in "componentWillUnmount"</ li >
148
125
</ ul >
149
126
< div class ="result " id ="useMessage "> </ div >
150
127
</ div >
@@ -154,16 +131,20 @@ <h1>Messages</h1>
154
131
</ div >
155
132
</ section >
156
133
< section class ="container ">
157
- < h1 > Models </ h1 >
134
+ < h1 > Ajax & Model Layer </ h1 >
158
135
< 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 >
160
143
< ul >
144
+ < li > Choose your data backend</ li >
161
145
< li > Bind to your model layer using messages</ li >
146
+ < li > Ajax requests are messages made to the internet</ li >
162
147
</ 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 >
167
148
</ div >
168
149
</ div >
169
150
</ section >
0 commit comments