react-native-config/Example/App.js

41 lines
697 B
JavaScript

/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View
} from 'react-native';
import Config from 'react-native-config';
export default class App extends Component<{}> {
render() {
return (
<View style={styles.container}>
<Text style={styles.text}>
API_URL={Config.API_URL}
</Text>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
text: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
});