microsoft/vscode-react-native

Public

mirrored from https://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
0.6.15

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

SampleApplication/index.ios.js

59lines · modeblame

514f9fd6digeff10 years ago1/**
2* Sample React Native App
3* https://github.com/facebook/react-native
4*/
5'use strict';
6import React, {
7AppRegistry,
8Component,
9StyleSheet,
10Text,
11View,
12TouchableHighlight
13} from 'react-native';
14
15class SampleApplication extends Component {
16showMessage () {
17alert("You pressed a button");
18}
19render() {
20return (
21<View style={styles.container}>
22<Text style={styles.welcome}>
23Welcome to React Native!
24</Text>
25<Text style={styles.instructions}>
26To get started, edit index.ios.js
27</Text>
28<Text style={styles.instructions}>
29Press Cmd+R to reload,{'\n'}
30Cmd+D or shake for dev menu
31</Text>
32<TouchableHighlight onPress={() => this.showMessage()}>
33<Text>Toggle</Text>
34</TouchableHighlight>
35</View>
36);
37}
38}
39
40const styles = StyleSheet.create({
41container: {
42flex: 1,
43justifyContent: 'center',
44alignItems: 'center',
45backgroundColor: '#F5FCFF',
46},
47welcome: {
48fontSize: 20,
49textAlign: 'center',
50margin: 10,
51},
52instructions: {
53textAlign: 'center',
54color: '#333333',
55marginBottom: 5,
56},
57});
58
59AppRegistry.registerComponent('SampleApplication', () => SampleApplication);