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