【发布时间】:2021-07-07 10:49:11
【问题描述】:
当我使用来自@philly25/react-native-paytm 的这段代码时,我在控制台中变得未定义
请帮忙
componentDidMount() {
Paytm.addListener(Paytm.Events.PAYTM_RESPONSE, this.onPayTmResponse());
}
componentWillUnmount() {
Paytm.removeListener(Paytm.Events.PAYTM_RESPONSE, this.onPayTmResponse());
}
onPayTmResponse = (resp) => {
console.log("hi " + resp); // here getting undefined
}
【问题讨论】:
标签: javascript react-native paytm