As the name defines, a confirmation message is a verification, the user wants to perform while doing some particular action in the application.
Smart code
Syntax
ConfirmationAlert (title, message, positiveText, negativeText)
Parameters
- Title (Required) – Title defines the caption of the verification message you want to show.
- Message (Required) – The content of the title defines a message.
- Posititive Text (Optional) – The expression which reveals a positive behavior for a message like, Yes/ Okay/ Agree etc.
- Negative Text (optional) – The expression which reveals a negative behavior for a message like, No/ Cancel/ Disagree etc.
Direct Code
Syntax
this.setState({ spinner: false });
let cnfrm_result = await OreConfirmationAlert(“Confirmation”, “Do you want to Save the current workings?”, “Yes”, “No”);
this.setState({ spinner: true });
if (cnfrm_result == true){
.// Success Actions
}
else{
// Failures Actions
}
this.setState({ spinner: true });