mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
Merge pull request #963 from bobeagan/patch-1
Replace "comments.json" with this.props.url in the docs tutorial code snippet
This commit is contained in:
commit
fa046ca04e
1 file changed
+2
-2
@@ -386,13 +386,13 @@ var CommentBox = React.createClass({
|
||||
},
|
||||
componentWillMount: function() {
|
||||
$.ajax({
|
||||
url: 'comments.json',
|
||||
url: this.props.url,
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
this.setState({data: data});
|
||||
}.bind(this),
|
||||
error: function(xhr, status, err) {
|
||||
console.error("comments.json", status, err.toString());
|
||||
console.error(this.props.url, status, err.toString());
|
||||
}.bind(this)
|
||||
});
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user