Skip to content

Instantly share code, notes, and snippets.

@streetsmartdev
Created August 9, 2017 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save streetsmartdev/9fadf59867fc71132f2aa5f1f9709612 to your computer and use it in GitHub Desktop.
Save streetsmartdev/9fadf59867fc71132f2aa5f1f9709612 to your computer and use it in GitHub Desktop.
RN-LFVL-7 - Replacing renderFooter with ListFooterComponent
export default class Application extends Component {
...
render() {
if (this.state.isLoading) {
...
} else {
return (
<FlatList
...
ListFooterComponent={() => { // replaces renderFooter={() => {
return (
this.state.isLoadingMore &&
<View style={{ flex: 1, padding: 10 }}>
<ActivityIndicator size="small" />
</View>
);
}}
...
/>
);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment