useLibraryHandler =(type)=> async () => { // в type попадет ваш driverPhoto
await this.askPermissionsAsync();
let result = await ImagePicker.launchImageLibraryAsync({
allowsEditing: true,
aspect: [4, 3]
});
this.setState({[type]:{ photos : { ...this.state.photos, driverPhoto : result.uri } }});
};
https://facebook.github.io/react-native/docs/async...
https://medium.com/building-with-react-native/what...