Skip to content

Instantly share code, notes, and snippets.

@streetsmartdev
Created August 9, 2017 14:52
Show Gist options
  • Save streetsmartdev/73569176fdbdd1187120ea7ca85cbbf8 to your computer and use it in GitHub Desktop.
Save streetsmartdev/73569176fdbdd1187120ea7ca85cbbf8 to your computer and use it in GitHub Desktop.
RN-LVFL-1 - importing FlatList
import React, {Component} from "react";
import {
Image,
StyleSheet,
Text,
View,
FlatList, //Replace ListView with FlatList
ActivityIndicator
} from "react-native";
export default class Application extends Component {
...
render() {
if (this.state.isLoading) {
return (
<View style={styles.container}>
<ActivityIndicator size="large"/>
</View>
);
} else {
return (
<FlatList
...
/>
);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment