Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async componentDidMount() {
const { asset } = this.props.navigation.state.params!;
const details = await MediaLibrary.getAssetInfoAsync(asset);
this.setState({ details });
}
const assetsInfo = Promise.all(selectedPhotos.map(i => MediaLibrary.getAssetInfoAsync(i)))
this.props.callback(assetsInfo)