Skip to content

Instantly share code, notes, and snippets.

@spencercarli
Created February 12, 2016 02:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spencercarli/2c873039c760952ee13f to your computer and use it in GitHub Desktop.
Save spencercarli/2c873039c760952ee13f to your computer and use it in GitHub Desktop.
Easily Connect React Native to a Meteor Server - Setting up the React Native App - button.js
import React, {
View,
Text,
TouchableOpacity,
StyleSheet
} from 'react-native';
export default React.createClass({
render() {
let { text, onPress } = this.props;
return (
<TouchableOpacity style={styles.button} onPress={onPress}>
<Text>{text}</Text>
</TouchableOpacity>
);
}
});
const styles = StyleSheet.create({
button: {
flex: 1,
backgroundColor: '#eee',
paddingHorizontal: 20,
paddingVertical: 10,
marginVertical: 10
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment