useLibraryHandler = async () => {
await this.askPermissionsAsync();
let result = await ImagePicker.launchImageLibraryAsync({
allowsEditing: true,
aspect: [4, 3]
});
let newPhotos = {...this.state.photos};
newPhotos[this.props.photoType] = result.uri;
this.setState({ photos : newPhotos });
};
useLibraryHandler = (photoType) => async () => {
.....
};
<TouchableHighlight onPress={this.useLibraryHandler('driverPhoto')}>
<TouchableHighlight onPress={this.useLibraryHandler('passportPhoto')}>
<TouchableHighlight onPress={this.useLibraryHandler('driverLicensePhoto')}>
https://www.npmjs.com/package/rn-bottom-drawer
C Animated был знаком, а вот с LayoutAnimation нет. Почитав доки, на мой взгляд мне больше подходит PanResponder