commit
397fb7a3fe
|
@ -300,7 +300,7 @@ var {
|
|||
} = React;
|
||||
```
|
||||
|
||||
Now modify the render funtion so that once we have our data it renders a ListView of movies instead of a single movie.
|
||||
Now modify the render function so that once we have our data it renders a ListView of movies instead of a single movie.
|
||||
|
||||
```javascript
|
||||
render: function() {
|
||||
|
@ -318,9 +318,9 @@ Now modify the render funtion so that once we have our data it renders a ListVie
|
|||
},
|
||||
```
|
||||
|
||||
The `DataSource` is an interfacte that `ListView` is using to determine which rows have changed over the course of updates.
|
||||
The `DataSource` is an interface that `ListView` is using to determine which rows have changed over the course of updates.
|
||||
|
||||
You'll notice we used `dataSource` from `this.state`. The next step is to add an empty `dataSource` to the object returned by `getInitialState`. Also, now that we're storing the data in `dataSource`, we should not longer use `this.state.movies` to avoid storing data twice. We can use boolean property of the state (`this.state.loaded`) to tell whether data fetching has finished.
|
||||
You'll notice we used `dataSource` from `this.state`. The next step is to add an empty `dataSource` to the object returned by `getInitialState`. Also, now that we're storing the data in `dataSource`, we should no longer use `this.state.movies` to avoid storing data twice. We can use boolean property of the state (`this.state.loaded`) to tell whether data fetching has finished.
|
||||
|
||||
```javascript
|
||||
getInitialState: function() {
|
||||
|
|
Loading…
Reference in New Issue