diff --git a/docs/tutorial.md b/docs/tutorial.md index d9ca8729c..ab49fe572 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -383,8 +383,12 @@ var CommentBox = React.createClass({ getInitialState: function() { $.ajax({ url: 'comments.json', + dataType: 'json', success: function(data) { this.setState({data: data}); + }.bind(this), + error: function(xhr, status, err) { + console.log("comments.json", status, err.toString()); }.bind(this) }); return {data: []};