[React Native] Remove eventTypes from ReactNativeBridgeEventPlugin (#15802)

This commit is contained in:
Ricky
2019-06-05 13:21:12 +01:00
committed by Christoph Nakazawa
parent 7b28ad119e
commit 843a59ab60
2 changed files with 3 additions and 7 deletions
@@ -22,11 +22,10 @@ import {ReactNativeViewConfigRegistry} from 'react-native/Libraries/ReactPrivate
const {
customBubblingEventTypes,
customDirectEventTypes,
eventTypes,
} = ReactNativeViewConfigRegistry;
const ReactNativeBridgeEventPlugin = {
eventTypes: eventTypes,
eventTypes: {},
/**
* @see {EventPluginHub.extractEvents}
@@ -22,11 +22,9 @@ const invariant = require('invariant');
// Event configs
const customBubblingEventTypes = {};
const customDirectEventTypes = {};
const eventTypes = {};
exports.customBubblingEventTypes = customBubblingEventTypes;
exports.customDirectEventTypes = customDirectEventTypes;
exports.eventTypes = eventTypes;
const viewConfigCallbacks = new Map();
const viewConfigs = new Map();
@@ -51,7 +49,7 @@ function processEventTypes(
if (bubblingEventTypes != null) {
for (const topLevelType in bubblingEventTypes) {
if (customBubblingEventTypes[topLevelType] == null) {
eventTypes[topLevelType] = customBubblingEventTypes[topLevelType] =
customBubblingEventTypes[topLevelType] =
bubblingEventTypes[topLevelType];
}
}
@@ -60,8 +58,7 @@ function processEventTypes(
if (directEventTypes != null) {
for (const topLevelType in directEventTypes) {
if (customDirectEventTypes[topLevelType] == null) {
eventTypes[topLevelType] = customDirectEventTypes[topLevelType] =
directEventTypes[topLevelType];
customDirectEventTypes[topLevelType] = directEventTypes[topLevelType];
}
}
}