replace "comments.json" with this.props.url
Bob Eagan committed
Jan 24, 2014 at 08:52 UTC
7614af3c9a8ad950c6f0a73fad07c8161afcc180
1 file changed
+2
-2
docs/docs/tutorial.md
+2
-2
@@ -386,13 +386,13 @@ var CommentBox = React.createClass({
386
},
387
componentWillMount: function() {
388
$.ajax({
389
- url: 'comments.json',
389
+ url: this.props.url,
390
dataType: 'json',
391
success: function(data) {
392
this.setState({data: data});
393
}.bind(this),
394
error: function(xhr, status, err) {
395
- console.error("comments.json", status, err.toString());
395
+ console.error(this.props.url, status, err.toString());
396
}.bind(this)
397
});
398
},