【发布时间】:2017-10-11 08:49:40
【问题描述】:
如果我想阻止 View 组件上的 onPress 事件传播到父 Touchable 以获取以下 Sample 组件,除了将子视图包装在 Touchable 中之外,最好的选择是什么?
export default function Sample (): Element<*> {
return(
<TouchableOpacity>
<View>
<Text>Sample</Text>
</View>
</TouchableOpacity>
);
}
【问题讨论】:
标签: react-native react-native-android react-native-ios touchableopacity touchablehighlight