为什么 hitSlop 在这个嵌套的 TouchableOpacity 组件中不起作用?

ger*_*eee 6 react-native touchableopacity

我有一个嵌套的 TouchableOpacity 组件,如下所示:

  <View style={styles.mainTextContainer}>
    <Text>
      {mainText}
      <TouchableOpacity
        hitSlop={{top: Gutter, left: Gutter, bottom: Gutter, right: Gutter}}
        style={styles.icon}
        onPress={onPress}>
        {mainTextIcon}
      </TouchableOpacity>
    </Text>
  </View>

  // These are the corresponding styles
  icon: {
    justifyContent: "center",
  },
  mainTextContainer: {
    flexDirection: "row",
    flexWrap: "wrap",
    justifyContent: "flex-start",
  },
Run Code Online (Sandbox Code Playgroud)

但是, hitSlop 道具似乎不起作用。是因为它嵌套在文本组件内吗?