I have the following code but it does not work
The first part is working fine and zi get the alert but the second one ia not
<Button onPress={ if (this.state.value===""){ alert("try again"); } else { this.functionToBeCalled } }
<Button onPress={ if (this.state.value===""){ alert("try again"); } else { this.functionToBeCalled }
}
Aucun commentaire:
Enregistrer un commentaire