From 2e2bcbd8610651c43a9b6f348c4f2f71b56e8a13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20O=E2=80=99Shannessy?= Date: Fri, 16 Jan 2015 13:10:00 -0800 Subject: [PATCH] Merge pull request #2360 from beausmith/patch-1 Highlighted changed lines in examples --- docs/docs/tutorial.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/tutorial.md b/docs/docs/tutorial.md index b903cc79f9..d8b4fe5b88 100644 --- a/docs/docs/tutorial.md +++ b/docs/docs/tutorial.md @@ -413,7 +413,7 @@ var CommentBox = React.createClass({ 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. -```javascript{3,19-20,34} +```javascript{3,14,19-20,34} // tutorial14.js var CommentBox = React.createClass({ loadCommentsFromServer: function() { @@ -476,7 +476,7 @@ var CommentForm = React.createClass({ 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. -```javascript{3-14,17-19} +```javascript{3-14,18-20} // tutorial16.js var CommentForm = React.createClass({ handleSubmit: function(e) {