Overview:
The react-native-photo-upload component simplifies handling of photos in a React Native application by integrating features from react-native-image-picker, react-native-image-resizer, and react-native-fs. This component facilitates image selection, retrieval of base64 image strings, and updating the image source seamlessly with user interaction.
Features:
- Automatic Installation: Links necessary dependencies for the component.
- Manual Installation: Provides steps for manual linking of libraries.
- Usage: Prompts image selection upon press, replaces image source with selected image’s base64 string.
- Props: Container style customization, image picker title, image resize options, response handling functions, etc.
Installation:
Automatic Installation:
npm install or yarn installManual Installation:
- Follow specific installation instructions for each library manually.
Android Installation:
- Update android build tools version in android/build.gradle.
- Update gradle version in android/gradle/wrapper/gradle-wrapper.properties.
- Add required permissions in AndroidManifest.xml.
IOS Installation:
- Add necessary keys with descriptions in Info.plist for NSPhotoLibraryUsageDescription, NSCameraUsageDescription, and NSMicrophoneUsageDescription (if needed).
Summary:
The react-native-photo-upload component streamlines photo handling in React Native applications by incorporating features from essential libraries like react-native-image-picker, react-native-image-resizer, and react-native-fs. With straightforward installation steps and versatile usage options, developers can easily integrate this component to enhance their app’s image selection and manipulation capabilities.