Fetch data in `componentDidMount`. When the response arrives, store the data in state, triggering a render to update your UI.
Fetch data in `componentDidMount`. When the response arrives, store the data in state, triggering a render to update your UI.
When processing the response of an asynchronous request, be sure to check that the component is still mounted before updating its state by using `this.isMounted()`.
This example fetches the desired Github user's latest gist:
This example fetches the desired Github user's latest gist:
```js
```js
@ -25,10 +27,12 @@ var UserGist = React.createClass({