Component - Image picker
This component lets users pick an image from their device gallery or take a new photo with the camera. It shows the selected image on the screen and a button to open the image picker.
This component lets users pick an image from their device gallery or take a new photo with the camera. It shows the selected image on the screen and a button to open the image picker.
View ├── Image └── Button
launchImageLibrary({}, response => {
if (response.didCancel) {
console.log('User cancelled');
} else if (response.errorCode) {
console.log('Error:', response.errorMessage);
} else {
console.log('Image URI:', response.assets[0].uri);
}
});launchImageLibrary(options, response => {
if (response.didCancel) {
console.log('User cancelled');
} else if (response.errorCode) {
console.log('Error:', response.errorMessage);
} else {
console.log('Image URI:', response.uri);
}
});launchImageLibrary?Pass the test and this pattern moves unknown