mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
35 lines
1.0 KiB
JavaScript
35 lines
1.0 KiB
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @flow
|
|
*/
|
|
|
|
import './ReactNativeInjectionShared';
|
|
|
|
import * as ReactNativeComponentTree from './ReactNativeComponentTree';
|
|
import * as EventPluginUtils from 'events/EventPluginUtils';
|
|
import * as ReactNativeEventEmitter from './ReactNativeEventEmitter';
|
|
import ReactNativeGlobalResponderHandler from './ReactNativeGlobalResponderHandler';
|
|
import ResponderEventPlugin from 'events/ResponderEventPlugin';
|
|
|
|
// Module provided by RN:
|
|
import RCTEventEmitter from 'RCTEventEmitter';
|
|
|
|
/**
|
|
* Register the event emitter with the native bridge
|
|
*/
|
|
RCTEventEmitter.register(ReactNativeEventEmitter);
|
|
|
|
EventPluginUtils.setComponentTree(
|
|
ReactNativeComponentTree.getFiberCurrentPropsFromNode,
|
|
ReactNativeComponentTree.getInstanceFromNode,
|
|
ReactNativeComponentTree.getNodeFromInstance,
|
|
);
|
|
|
|
ResponderEventPlugin.injection.injectGlobalResponderHandler(
|
|
ReactNativeGlobalResponderHandler,
|
|
);
|