Skip to content

Commit

Permalink
Merge pull request facebook#359 from djkirby/fix-tutorial-typo
Browse files Browse the repository at this point in the history
Fix 'respondible' typo in Tutorial
  • Loading branch information
amasad committed Mar 27, 2015
2 parents e02ea66 + e23797b commit 31c9843
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/Tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ We want to send off the request after the component has finished loading. `compo
},
```

Now add `fetchData` function used above to our main component. This method will be respondible for handling data fetching. All you need to do is call `this.setState({movies: data})` after resolving the promise chain because the way React works is that `setState` actually triggers a re-render and then the render function will notice that `this.state.movies` is no longer `null`. Note that we call `done()` at the end of the promise chain - always make sure to call `done()` or any errors thrown will get swallowed.
Now add `fetchData` function used above to our main component. This method will be responsible for handling data fetching. All you need to do is call `this.setState({movies: data})` after resolving the promise chain because the way React works is that `setState` actually triggers a re-render and then the render function will notice that `this.state.movies` is no longer `null`. Note that we call `done()` at the end of the promise chain - always make sure to call `done()` or any errors thrown will get swallowed.

```javascript
fetchData: function() {
Expand Down

0 comments on commit 31c9843

Please sign in to comment.