main
js 40 lines 1.26 KB
Raw
1 /**
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 *
7 * @flow
8 */
9
10 /**
11 * Make sure essential globals are available and are patched correctly. Please don't remove this
12 * line. Bundles created by react-packager `require` it before executing any application code. This
13 * ensures it exists in the dependency graph and can be `require`d.
14 * TODO: require this in packager, not in React #10932517
15 */
16 // Module provided by RN:
17 import 'react-native/setup-env';
18
19 import ResponderEventPlugin from './legacy-events/ResponderEventPlugin';
20 import {
21 injectEventPluginOrder,
22 injectEventPluginsByName,
23 } from './legacy-events/EventPluginRegistry';
24
25 import ReactNativeBridgeEventPlugin from './ReactNativeBridgeEventPlugin';
26 import ReactNativeEventPluginOrder from './ReactNativeEventPluginOrder';
27
28 /**
29 * Inject module for resolving DOM hierarchy and plugin ordering.
30 */
31 injectEventPluginOrder(ReactNativeEventPluginOrder);
32
33 /**
34 * Some important event plugins included by default (without having to require
35 * them).
36 */
37 injectEventPluginsByName({
38 ResponderEventPlugin: ResponderEventPlugin,
39 ReactNativeBridgeEventPlugin: ReactNativeBridgeEventPlugin,
40 });