Signing up for the Expo and React Native apps
To be honest, I am very glad that both Expo and React Native can share the same code with the Amplify UI. Because of this, you don't need to worry about if you decided to go with Expo first and want to change it to pure React Native later, since you can reuse the same code base.
We will follow the Understanding AWS authentication section of this chapter for the React Native and Expo apps. Here, we must remove the old Cognito user pool, which contains your email as the identifier, and add a new Cognito user pool with the username as the identifier, plus the additional settings, to the Cognito console.
Now, we need to go to the app directory, open the App.tsx
file, and do the following:
- Import the necessary libraries, such as the React and the React Native libraries and the Amplify React Native library:
import React from 'react'; import { View, Text } from 'react-native'; import { withAuthenticator...