title: React Native FlatList load more when we get to the bottom of the list
body: <p>How to make load more with FlatList of React Native <strong>(Not infinite)</strong></p>
  <h3>I've done this, but unfortunately it loads as infinitely.</h3>
  <p>This is my code snippet</p>
  <pre class="lang-js prettyprint-override"><code>&lt;FlatList
      data={this.props.data}
      renderItem={({ item, separators }) =&gt; (
          &lt;TouchableHighlight
              onPress={() =&gt; this._onPress(item)}
              onShowUnderlay={separators.highlight}
              onHideUnderlay={separators.unhighlight}
          &gt;
              &lt;Text&gt; {item.title} &lt;/Text&gt;
          &lt;/TouchableHighlight&gt;
      )}
      keyExtractor={item =&gt; item.id}
      ListFooterComponent={this.renderFooter}
      onEndReached={this.props.handleLoadMore}
      onEndThreshold={0}
  /&gt;
  </code></pre>
  <p>And my handleLoadMore</p>
  <pre class="lang-js prettyprint-override"><code>handleLoadMore = () =&gt; {
      console.log(&quot;test&quot;); // &lt;---- this line run infinitely
      fetch(url, {
          method: &quot;POST&quot;,
          headers: {
              Accept: &quot;application/json&quot;,
              &quot;Content-Type&quot;: &quot;application/json&quot;
          },
          body: JSON.stringify(filters)
      })
          .then(response =&gt; response.json())
          .then(responseJson =&gt; {
              this.setState({
                  itemData: [
                      ...this.state.itemData,
                      ...responseJson.estate_list
                  ],
                  itemPage: this.state.itemPage + 1
              });
          })
          .catch(error =&gt; {
              console.error(error);
          });
  };
  </code></pre>