Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
removeFromAlbum = async () => {
const { asset, album } = this.props.navigation.state.params!;
if (album) {
await MediaLibrary.removeAssetsFromAlbumAsync(asset.id, album.id);
this.goBack();
}
}