Login

The <Login /> component heavily relies on the users store for logic, as it is mostly focused on rendering two forms for login and registration. All the validation for the forms is done by Firebase, so we only need to focus on rendering the UI elements and calling the proper store methods. 

In this screen, we will be using the react-native-keyboard-aware-scroll view, which is a module providing a self-scrolling <Scrollview />, which reacts to any focused <TextInput /> so they are not hidden when the keyboard pops up. 

Let's take a look at the code:

/*** src/screens/Login.js ***/import React, { PropTypes } from 'react' import { ScrollView, TextInput, Button, Text, View, Image, ActivityIndicator } from 'react-native'; import { observer, ...

Get React Native Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.