[React Native] Remove eventTypes from ReactNativeBridgeEventPlugin (#15802)
Ricky committed
Jun 5, 2019 at 13:21 UTC
843a59ab607d0141985e1309d05a92c338e413cd
2 files changed
+3
-7
packages/react-native-renderer/src/ReactNativeBridgeEventPlugin.js
+1
-2
@@ -22,11 +22,10 @@ import {ReactNativeViewConfigRegistry} from 'react-native/Libraries/ReactPrivate
22
const {
23
customBubblingEventTypes,
24
customDirectEventTypes,
25
- eventTypes,
25
} = ReactNativeViewConfigRegistry;
26
27
const ReactNativeBridgeEventPlugin = {
29
- eventTypes: eventTypes,
28
+ eventTypes: {},
29
30
/**
31
* @see {EventPluginHub.extractEvents}
scripts/rollup/shims/react-native/ReactNativeViewConfigRegistry.js
+2
-5
@@ -22,11 +22,9 @@ const invariant = require('invariant');
22
// Event configs
23
const customBubblingEventTypes = {};
24
const customDirectEventTypes = {};
25
-const eventTypes = {};
25
26
exports.customBubblingEventTypes = customBubblingEventTypes;
27
exports.customDirectEventTypes = customDirectEventTypes;
29
-exports.eventTypes = eventTypes;
28
29
const viewConfigCallbacks = new Map();
30
const viewConfigs = new Map();
@@ -51,7 +49,7 @@ function processEventTypes(
49
if (bubblingEventTypes != null) {
50
for (const topLevelType in bubblingEventTypes) {
51
if (customBubblingEventTypes[topLevelType] == null) {
54
- eventTypes[topLevelType] = customBubblingEventTypes[topLevelType] =
52
+ customBubblingEventTypes[topLevelType] =
53
bubblingEventTypes[topLevelType];
54
}
55
}
@@ -60,8 +58,7 @@ function processEventTypes(
58
if (directEventTypes != null) {
59
for (const topLevelType in directEventTypes) {
60
if (customDirectEventTypes[topLevelType] == null) {
63
- eventTypes[topLevelType] = customDirectEventTypes[topLevelType] =
64
- directEventTypes[topLevelType];
61
+ customDirectEventTypes[topLevelType] = directEventTypes[topLevelType];
62
}
63
}
64
}