react-native-config/Example/App.js

41 lines
697 B
JavaScript
Raw Permalink Normal View History

2017-12-05 05:34:37 +00:00
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
2016-02-22 21:06:06 +00:00
2016-09-14 01:39:29 +00:00
import React, { Component } from 'react';
import {
2016-02-22 20:54:52 +00:00
StyleSheet,
Text,
View
} from 'react-native';
2016-02-22 21:06:06 +00:00
import Config from 'react-native-config';
2017-12-05 05:34:37 +00:00
export default class App extends Component<{}> {
2016-02-22 20:54:52 +00:00
render() {
return (
<View style={styles.container}>
2016-02-22 21:06:06 +00:00
<Text style={styles.text}>
2016-03-03 21:32:22 +00:00
API_URL={Config.API_URL}
2016-02-22 20:54:52 +00:00
</Text>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
2016-02-22 21:06:06 +00:00
text: {
2016-02-22 20:54:52 +00:00
fontSize: 20,
textAlign: 'center',
margin: 10,
},
});