mirror of
https://github.com/status-im/react-native.git
synced 2025-01-29 10:45:04 +00:00
4551e9347a
Summary: Update the template that will be used by `react-native init --template navigation`. The goal is to make it easier for people to get started by demonstrating a few very basic concepts such as navigation, lists and text input. **Test plan (required)** <img src="https://cloud.githubusercontent.com/assets/346214/22697898/ced66f52-ed4a-11e6-9b90-df6daef43199.gif" alt="Android Example" height="800" style="float: left"/> <img src="https://cloud.githubusercontent.com/assets/346214/22697901/cfeab3e4-ed4a-11e6-8552-d76585317ac2.gif" alt="iOS Example" height="800"/> Closes https://github.com/facebook/react-native/pull/12260 Differential Revision: D4521758 Pulled By: mkonicek fbshipit-source-id: d7d9e481dd3373917ac68ec9169b9ac3267547a9
51 lines
1.2 KiB
JavaScript
51 lines
1.2 KiB
JavaScript
import React, { Component } from 'react';
|
|
import {
|
|
StyleSheet,
|
|
Text,
|
|
View,
|
|
} from 'react-native';
|
|
|
|
export default class WelcomeText extends Component {
|
|
render() {
|
|
return (
|
|
<View style={styles.container}>
|
|
<Text style={styles.welcome}>
|
|
Welcome to React Native!
|
|
</Text>
|
|
<Text style={styles.instructions}>
|
|
This app shows the basics of navigating between a few screens,
|
|
working with ListView and handling text input.
|
|
</Text>
|
|
<Text style={styles.instructions}>
|
|
Modify any files to get started. For example try changing the
|
|
file{'\n'}views/welcome/WelcomeText.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: 'white',
|
|
padding: 20,
|
|
},
|
|
welcome: {
|
|
fontSize: 20,
|
|
textAlign: 'center',
|
|
margin: 16,
|
|
},
|
|
instructions: {
|
|
textAlign: 'center',
|
|
color: '#333333',
|
|
marginBottom: 12,
|
|
},
|
|
});
|