pull to refresh react native code example
Example 1: scrollview refresh
refreshControl={
<RefreshControl
refreshing={this.state.refreshing}
onRefresh={this._onRefresh}
/>
}
Example 2: react native flatlist pull to refresh
// Make sure to also set the refreshing prop correctly.
<FlatList
data={ this.state.FlatListItems }
onRefresh={() => this.onRefresh()}
refreshing={this.state.isFetching}
/>