Skip to content

Commit 4865ddf

Browse files
committed
Merge pull request facebook#5712 from dortonway/master
Fix misunderstanding in tutorial
2 parents bae0f19 + 109c9a9 commit 4865ddf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/docs/tutorial.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ var CommentBox = React.createClass({
416416
});
417417
```
418418

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.
420420

421421
```javascript{3,15,20-21,35}
422422
// tutorial14.js

0 commit comments

Comments
 (0)