Created
February 12, 2017 21:00
-
-
Save josenaves/0a1c95b3464b2b2f708357d763c89c9e to your computer and use it in GitHub Desktop.
Module example
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
/** | |
* Sample React Native App | |
* https://github.com/facebook/react-native | |
* @flow | |
*/ | |
import React, { Component } from 'react'; | |
import { | |
AppRegistry, | |
StyleSheet, | |
Text, | |
View | |
} from 'react-native'; | |
import * as lib from './src/temp.js'; | |
export default class TempProject 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}> | |
Double tap R on your keyboard to reload,{'\n'} | |
Shake or press menu button for dev menu{'\n'} | |
Message from file: {lib.message} | |
</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('TempProject', () => TempProject); |
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
// put this file in src/temp.js | |
export const message = 'Hello from file'; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment