mirror of
https://github.com/status-im/react-native.git
synced 2025-01-17 04:50:59 +00:00
081a413340
Summary:Hello there! Since React Native generates `index.*.js` files with usage of ES6 modules, `'use strict'` became unnecessary. http://www.ecma-international.org/ecma-262/6.0/#sec-strict-mode-code > Module code is always strict mode code. Closes https://github.com/facebook/react-native/pull/6322 Differential Revision: D3017181 Pulled By: vjeux fb-gh-sync-id: 39e0fe703b8d8a0093b952f2c18a36d0d28e1020 shipit-source-id: 39e0fe703b8d8a0093b952f2c18a36d0d28e1020
52 lines
1006 B
JavaScript
52 lines
1006 B
JavaScript
/**
|
|
* Sample React Native App
|
|
* https://github.com/facebook/react-native
|
|
*/
|
|
|
|
import React, {
|
|
AppRegistry,
|
|
Component,
|
|
StyleSheet,
|
|
Text,
|
|
View
|
|
} from 'react-native';
|
|
|
|
class <%= name %> 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}>
|
|
Shake or press menu button 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('<%= name %>', () => <%= name %>);
|