我无法从 onPress 返回事件对象。我错过了什么?
constructor(props) {
super(props)
this.state = {
user: null,
}
this.testEvent = this.testEvent.bind(this)
}
testEvent(e, id) {
console.log(e)
}
<TouchableWithoutFeedback style={styles.rightGroupContainer}
onPress={(e) => this.testEvent(e, id)}>
<Image source={this.closeIcon} style={styles.closeIcon}></Image>
</TouchableWithoutFeedback>