diff --git a/docs/tutorial.md b/docs/tutorial.md index 3e197261..603172d7 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -384,8 +384,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.error("comments.json", status, err.toString()); }.bind(this) }); return {data: []};