【发布时间】:2020-05-02 22:28:33
【问题描述】:
我在父组件和子组件中都使用NativeEventEmitter 来处理父组件和子组件中相同的特定键盘事件(按下 F6 时)。当按下此键时,它们都有自己不同的回调来处理。
当它被压在孩子身上时,我不希望父母的听众开火。 React Native 中没有像标准 React 中那样的 stopPropogation 方法。
<Parent>
<Child/>
</Parent>
【问题讨论】:
标签: react-native keyboard-events event-listener eventemitter react-native-windows