Skip to content

Instantly share code, notes, and snippets.

@matteocollina
Last active March 29, 2018 21:36
Show Gist options
  • Save matteocollina/4d6bc4dadabd3b3a98b8e223427b1fc8 to your computer and use it in GitHub Desktop.
Save matteocollina/4d6bc4dadabd3b3a98b8e223427b1fc8 to your computer and use it in GitHub Desktop.
Minimal react-native js file
'use strict';
import React from 'react';
import ReactNative, {
AppRegistry,
StyleSheet,
Text,
View,
} from 'react-native';
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: 'green',
},
welcome: {
fontSize: 20,
color: 'white',
},
});
class StoryReactComponent extends React.Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>We are live from React Native!</Text>
</View>
)
}
}
AppRegistry.registerComponent('StoryReactComponent', () => StoryReactComponent);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment