Skip to content

Instantly share code, notes, and snippets.

@DanielMSchmidt
Created April 14, 2016 08:35
Show Gist options
  • Save DanielMSchmidt/7ef2a16249eb306d4f05f8b3753cc856 to your computer and use it in GitHub Desktop.
Save DanielMSchmidt/7ef2a16249eb306d4f05f8b3753cc856 to your computer and use it in GitHub Desktop.
react native init bar with react-native: 0.23.1
/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
import React, {
AppRegistry,
Component,
StyleSheet,
Text,
View
} from 'react-native';
class bar extends Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to React Native!
</Text>
<Text style={styles.instructions}>
To get started, edit index.android.js
</Text>
<Text style={styles.instructions}>
Shake or press menu button for dev menu
</Text>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
});
AppRegistry.registerComponent('bar', () => bar);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment