Adding the Photo Picker component with Amplify Storage with Expo and React Native
In this section, we will add the Photo Picker component to our Expo and React Native apps to let the user upload photos to Amplify Storage (an S3 Bucket). The steps will be similar between Expo and React Native, but the component will be slightly different.
- For the Expo app, install the specific image picker library that is developed by Expo called
expo-image-pickerby running the following command:
expo install expo-image-picker
- For the React Native app, install the community-made image called
react-native-image-pickerby running the following two commands:
yarn add react-native-image-picker npx pod-install
- Once you have installed the image picker for your React Native project, recompile the project with the
yarn androidcommands to see if it works.
- If you try...