Fix ajax example in React (#26)
This commit is contained in:
parent
75ee1e0a4c
commit
5e38819c34
2
react.md
2
react.md
|
@ -171,7 +171,7 @@ See [initial AJAX data](http://facebook.github.io/react/tips/initial-ajax.html).
|
||||||
|
|
||||||
```js
|
```js
|
||||||
React.createClass({
|
React.createClass({
|
||||||
componentWillMount: function () {
|
componentDidMount: function () {
|
||||||
$.get(this.props.url, function (data) {
|
$.get(this.props.url, function (data) {
|
||||||
this.setState(data);
|
this.setState(data);
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
|
Loading…
Reference in New Issue