|
1 | | -/** |
2 | | - * Sample React Native App |
3 | | - * https://github.com/facebook/react-native |
4 | | - * @flow |
5 | | - */ |
| 1 | +import React from 'react'; |
| 2 | +import {AppRegistry} from 'react-native'; |
6 | 3 |
|
7 | | -import React, { Component } from 'react'; |
8 | | -import { |
9 | | - AppRegistry, |
10 | | - StyleSheet, |
11 | | - Text, |
12 | | - View |
13 | | -} from 'react-native'; |
| 4 | +import App from './app/components/App'; |
14 | 5 |
|
15 | | -export default class ReactNativeCodeReuse extends Component { |
16 | | - render() { |
17 | | - return ( |
18 | | - <View style={styles.container}> |
19 | | - <Text style={styles.welcome}> |
20 | | - Welcome to React Native! |
21 | | - </Text> |
22 | | - <Text style={styles.instructions}> |
23 | | - To get started, edit index.android.js |
24 | | - </Text> |
25 | | - <Text style={styles.instructions}> |
26 | | - Double tap R on your keyboard to reload,{'\n'} |
27 | | - Shake or press menu button for dev menu |
28 | | - </Text> |
29 | | - </View> |
30 | | - ); |
31 | | - } |
| 6 | +export default class ReactNativeCodeReuse extends React.Component { |
| 7 | + render() { |
| 8 | + return ( |
| 9 | + <App /> |
| 10 | + ); |
| 11 | + } |
32 | 12 | }
|
33 | 13 |
|
34 | | -const styles = StyleSheet.create({ |
35 | | - container: { |
36 | | - flex: 1, |
37 | | - justifyContent: 'center', |
38 | | - alignItems: 'center', |
39 | | - backgroundColor: '#F5FCFF', |
40 | | - }, |
41 | | - welcome: { |
42 | | - fontSize: 20, |
43 | | - textAlign: 'center', |
44 | | - margin: 10, |
45 | | - }, |
46 | | - instructions: { |
47 | | - textAlign: 'center', |
48 | | - color: '#333333', |
49 | | - marginBottom: 5, |
50 | | - }, |
51 | | -}); |
52 | | - |
53 | 14 | AppRegistry.registerComponent('ReactNativeCodeReuse', () => ReactNativeCodeReuse);
|
0 commit comments