mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[React Native] Remove eventTypes from ReactNativeBridgeEventPlugin (#15802)
This commit is contained in:
committed by
Christoph Nakazawa
parent
7b28ad119e
commit
843a59ab60
@@ -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];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user