-
-
Save streetsmartdev/73569176fdbdd1187120ea7ca85cbbf8 to your computer and use it in GitHub Desktop.
RN-LVFL-1 - importing FlatList
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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