@samitouri / QOS-React / commits / 109c9a91e2

Fix misunderstanding in tutorial

dortonway committed Dec 23, 2015 at 03:01 UTC 109c9a91e27f4c71667e893a2c60ee6c466788c3
1 file changed +1 -1
docs/docs/tutorial.md
+1 -1
@@ -416,7 +416,7 @@ var CommentBox = React.createClass({
416 });
417 ```
418
419 -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.
419 +Here, `componentDidMount` is a method called automatically by React after a component is rendered for the first time. 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.
420
421 ```javascript{3,15,20-21,35}
422 // tutorial14.js