Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React, {Component} from 'react';
- import {
- AppRegistry,
- StyleSheet,
- Text,
- View,
- } from 'react-native';
- import { StackNavigator } from 'react-navigation';
- import loginScreen from './src/components/loginView';
- import registerScreen from './src/components/registerView';
- const Appmemes = StackNavigator({
- Login: {screen: loginScreen},
- Register: {screen: registerScreen}
- });
- export default Appmemes;
- AppRegistry.registerComponent('Appmemes', () => Appmemes);
- .
- .
- .
- <View style={styles.formContainer}>
- <LoginForm/>
- </View>
- .
- .
- .
- LoginForm.js
- import React, { Component } from 'react'
- import { StyleSheet, TextInput, Text, View, TouchableOpacity, AppRegistry} from 'react-native'
- import { StackNavigator} from 'react-navigation';
- export default class LoginForm extends Component{
- render() {
- return(
- <View style={styles.container}>
- <TouchableOpacity style={styles.buttonContainer1}>
- <Text style={styles.buttonText}>Entrar</Text>
- </TouchableOpacity>
- <TouchableOpacity style={styles.buttonContainer2} onPress={() => this.props.navigation.navigate('Login')}>
- <Text style={styles.buttonText}>Registrarse</Text>
- </TouchableOpacity>
- </View>
- );
- }
- }
- AppRegistry.registerComponent('LoginForm', () => LoginForm);
- const styles = StyleSheet.create({...]);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement