title: React Native - Activity Indicator while FlatList loads images
body: <p>Whenever my app mounts, I have set:</p>
  
  <pre><code>constructor(props) {
      super(props);
      this.state = {
          loading: true
      };
  }
  </code></pre>
  
  <p>I have an activity indicator which animates until <code>loading: false</code>:</p>
  
  <pre><code>{this.state.loading &amp;&amp;
      &lt;View style={styles.loading}&gt;
           &lt;ActivityIndicator color="red" animating={this.state.loading} /&gt;
      &lt;/View&gt;
  }
  </code></pre>
  
  <p>I tried searching inside <a href="https://facebook.github.io/react-native/docs/flatlist.html" rel="nofollow noreferrer">FlatList</a>'s documentation for a method would tell me if all items have been rendered so I can call <code>this.setState({loading: false});</code> However, I did not manage to find such method. </p>
  
  <p>Does anyone know how can I display my activity indicator whilst the list is loading its data?</p>