Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import React, { Component } from 'react';
import {
Platform,
StyleSheet,
Text,
View,
Button
} from 'react-native';
import firebase from 'react-native-firebase';
const firebaseAnalytics = firebase.analytics();
export default class App extends Component<{}> {
onPressComprar(){
console.log('Boton comprar presionado');
};
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
React Native Firebase!
</Text>
<Button
onPress={this.onPressComprar}
title="Cromprar"
color="#841584"
/>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment