Skip to content

Instantly share code, notes, and snippets.

@YKalashnikov
Created November 24, 2019 23:20
Show Gist options
  • Save YKalashnikov/eed44a574673399a59bf7d09d4f86754 to your computer and use it in GitHub Desktop.
Save YKalashnikov/eed44a574673399a59bf7d09d4f86754 to your computer and use it in GitHub Desktop.
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
export default class App extends React.Component {
state = {
isLoading: true
};
render() {
const { isLoading } = this.state;
return (
<View style={styles.container}>
{isLoading ? (
<Text>Fetching The Weather</Text>
) : (
<View>
<Text>Minimalist Weather App</Text>
</View>
)}
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center'
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment