Skip to content

Instantly share code, notes, and snippets.

@btg5679
Created January 7, 2018 19:13
Show Gist options
  • Save btg5679/b6de104cec213f71750013a2ecd6838c to your computer and use it in GitHub Desktop.
Save btg5679/b6de104cec213f71750013a2ecd6838c to your computer and use it in GitHub Desktop.
import React, { Component } from "react";
import { Image, Text, View, Button, Picker } from "react-native";
import { styles } from "../utils/styles";
import SomeCustomComponent from "./SomeCustomComponent";
// see https://github.com/necolas/react-native-web
class App extends Component {
_onButtonPress() {
//do some things
}
render() {
return (
<View>
<View style={styles.box}>
<Text style={styles.text}>Yo, some things</Text>
</View>
<View style={styles.buttonView}>
<Button
onPress={this._onButtonPress}
title="Learn More"
accessibilityLabel="Learn more about this purple button"
/>
</View>
<View style={styles.pickerView}>
<Picker
selectedValue={"java"}
onValueChange={(itemValue, itemIndex) =>
this.setState({ language: itemValue })
}
>
<Picker.Item label="Java" value="java" />
<Picker.Item label="JavaScript" value="js" />
</Picker>
</View>
<View>
<SomeCustomComponent />
</View>
</View>
);
}
}
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment