How can I call method from onPress on Alert function [React-Native]
<Button
onPress={{() => Alert.alert(
'Alert Title',
'alertMessage',
[
{text: 'Cancel', onPress: () => console.log('Cancel Pressed!')},
{text: 'OK', onPress: () => {this.onDeleteBTN}},
],
{ cancelable: false }
)}}
>
<Text> Delete Record </Text>
</Button>
After OK button on Alert Dialog I need to call
onDeleteBTN = () => {
alert(' OnDelete');
}
{text: 'OK', onPress: () => {this.onDeleteBTN.bind(this)}},
{text: 'OK', onPress: () => {this.onDeleteBTN}},
It's not work