Skip to content

Commit

Permalink
规范入口
Browse files Browse the repository at this point in the history
  • Loading branch information
necfol committed Jun 9, 2017
1 parent 8dc1c9f commit fc4fff0
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 53 deletions.
54 changes: 1 addition & 53 deletions index.ios.js
Original file line number Diff line number Diff line change
@@ -1,53 +1 @@
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/

import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';

export default class MICRNCLI 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.ios.js
</Text>
<Text style={styles.instructions}>
Press Cmd+R to reload,{'\n'}
Cmd+D or shake for dev menu
</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('MICRNCLI', () => MICRNCLI);
import './src/app.js';
53 changes: 53 additions & 0 deletions src/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/

import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';

export default class MICRNCLI extends Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome MIC!
</Text>
<Text style={styles.instructions}>
To get started, edit index.ios.js
</Text>
<Text style={styles.instructions}>
Press Cmd+R to reload,{'\n'}
Cmd+D or shake for dev menu
</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('MICRNCLI', () => MICRNCLI);

0 comments on commit fc4fff0

Please sign in to comment.