@samitouri / QOS-React-2 / commits / df36c258b3

Highlighted changed lines in examples

Beau Smith committed Oct 15, 2014 at 23:01 UTC df36c258b348153c0e0c028352192d34c9ecc6d3
1 file changed +2 -2
docs/docs/tutorial.md
+2 -2
@@ -415,7 +415,7 @@ var CommentBox = React.createClass({
415
416 Here, `componentDidMount` is a method called automatically by React when a component is rendered. The key to dynamic updates is the call to `this.setState()`. We replace the old array of comments with the new one from the server and the UI automatically updates itself. Because of this reactivity, it is only a minor change to add live updates. We will use simple polling here but you could easily use WebSockets or other technologies.
417
418 -```javascript{3,19-20,34}
418 +```javascript{3,14,19-20,34}
419 // tutorial14.js
420 var CommentBox = React.createClass({
421 loadCommentsFromServer: function() {
@@ -478,7 +478,7 @@ var CommentForm = React.createClass({
478
479 Let's make the form interactive. When the user submits the form, we should clear it, submit a request to the server, and refresh the list of comments. To start, let's listen for the form's submit event and clear it.
480
481 -```javascript{3-14,17-19}
481 +```javascript{3-14,18-20}
482 // tutorial16.js
483 var CommentForm = React.createClass({
484 handleSubmit: function(e) {