import React, { Component } from 'react'; import { Text, StyleSheet, View, Button,TextInput,input } from 'react-native'; import ImageDetail from '../components/ImageDetail'; class LoginPage extends Component { constructor() { super(); this.state = { username: '', password: '', error: '', }; this.handlePassChange = this.handlePassChange.bind(this); this.handleUserChange = this.handleUserChange.bind(this); this.handleSubmit = this.handleSubmit.bind(this); this.dismissError = this.dismissError.bind(this); } dismissError() { this.setState({ error: '' }); } handleSubmit(evt) { evt.preventDefault(); if (!this.state.username) { return this.setState({ error: 'Username is required' }); } if (!this.state.password) { return this.setState({ error: 'Password is required' }); } return this.setState({ error: '' }); } handleUserChange(evt) { this.setState({ username: evt.target.value, }); }; handlePassChange(evt) { this.setState({ password: evt.target.value, }); } render() { Image Screen return ( User Name Password