Q:

React Native: ListView. DataSource is not updating

I am trying to update ListView. DataSource after fetching data from server but its not happening.  I have two components, one is imported in other.  
From base component I am trying to update ListView. DataSource in other component.  Here is my code. 
index.android.js
 import React, { Component } from "react";
 import { ListView, View, Button, AppRegistry } from "react-native";

 import OtherComponent from "./Components/OtherComponent";

 class MyApp extends Component {
  constructor(props) {
    super(props);
    this.state = {
        movies: [{ title: "ABCD" }, { title: "EFGH" }]
    };
}

getTopics = () => {
    fetch("https://facebook.github.io/react-native/movies.json")
        .then(response => response.json())
        .then(responseText => {
            console.log(responseText.movies);
            this.setState({
                movies: responseText.movies
            });
        })
        .catch(error => {
            console.warn(error);
        });
};

render() {
    return (
        <View>
            <Button
                onPress={this.getTopics}
                title="Get Topics"
                color="#841584"
                accessibilityLabel="Learn more about this purple button"
            />
            <OtherComponent movies={this.state.movies} />
        </View>
    );
}
}

AppRegistry.registerComponent("MyApp", () => MyApp);

OtheComponent.js
 import React, { Component } from "react";
 import { View, ListView, Text, StyleSheet, Button } from "react-native";

 export default class FormativeRevisionList extends Component {
  constructor(props) {
    super(props);
    const ds = new ListView. DataSource({
        rowHasChanged: (r1, r2) => r1 ! == r2
    });
    this.state = {
        dataSource: ds.cloneWithRows(props.movies)
    };
}

render() {
    return (
        <View>
            <ListView
                style={styles.listContainer}
                dataSource={this.state.dataSource}
                renderRow={rowData => (
                    <View>
                        <Text style={styles.listItem}>{rowData.title}</Text>
                    </View>
                )}
            />
        </View>
    );
}
}

const styles = StyleSheet.create({
listContainer: {
    paddingTop: 22
},
listItem: {
    fontSize: 30,
    fontWeight: "bold",
    textAlign: "center"
}
});

A:

In your code, you only set your dataSource in contructor of FormativeRevisionList, this mean FormativeRevisionList will only render the given movies when your first render it. 
To render new list after you press Get Topics button , you need to set the dataSource again when it receive new props, this can be achieve by setting it in FormativeRevisionList componentWillReceiveProps
  componentWillReceiveProps(nextProps) {
    if (nextProps.movies ! == this.props.movies) {
      this.setState({
        dataSource: this.state.dataSource.cloneWithRows(nextProps.movies)
      })
    }
  }

You can read more about componentWillReceiveProps from here

