Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ import {ReactNativeViewConfigRegistry} from 'react-native/Libraries/ReactPrivate
const {
customBubblingEventTypes,
customDirectEventTypes,
eventTypes,
} = ReactNativeViewConfigRegistry;

const ReactNativeBridgeEventPlugin = {
eventTypes: eventTypes,
eventTypes: {},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: even though the docstring says this is optional, the flowtype disagress


/**
* @see {EventPluginHub.extractEvents}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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];
}
}
Expand All @@ -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];
}
}
}
Expand Down