【发布时间】:2021-01-04 18:32:47
【问题描述】:
我正在尝试从警报按钮“是”调用并将值传递给我的函数,但它不起作用,当我使用函数值时,函数没有接收值并给出未定义的错误。这是我的代码
const sendemail = async ({ email, hash, password }) => {
console.log(email); //getting Error here undefined email
}
Alert.alert(
"Account is not activated",
"kindly check your email box and verify your account.Do you want to Resend Verification Email ?",
[
{
text: "Yes",
onPress: () =>
this.sendemail(
email,
hash,
password
),
},
{
text: "No",
// onPress: () => console.log("No"),
},
]
);
【问题讨论】:
标签: javascript reactjs react-native react-redux