Skip to content

Instantly share code, notes, and snippets.

@preslavrachev
Forked from lopezjurip/index.tsx
Created March 22, 2017 13:23
Show Gist options
  • Save preslavrachev/5284d9c120fa61a221761b39b875ff50 to your computer and use it in GitHub Desktop.
Save preslavrachev/5284d9c120fa61a221761b39b875ff50 to your computer and use it in GitHub Desktop.
// src/index.ts
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
ViewStyle,
TextStyle
} from 'react-native';
interface Props {
}
interface State {
}
export default class App extends Component<Props, State> {
render() {
return (
<View style={styles.container}>
<Text style={styles.text}>
Welcome to React Native!
</Text>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
} as ViewStyle,
text: {
fontSize: 20,
textAlign: 'center',
margin: 10,
} as TextStyle,
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment