publishEventForPlugin() — react Function Reference
Architecture documentation for the publishEventForPlugin() function in EventPluginRegistry.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 9ec49b43_49aa_a060_cf73_319f3806fbec["publishEventForPlugin()"] 6b52f26d_d341_6500_ecb0_54a0747596f4["EventPluginRegistry.js"] 9ec49b43_49aa_a060_cf73_319f3806fbec -->|defined in| 6b52f26d_d341_6500_ecb0_54a0747596f4 3b29f8fc_9a36_ab97_6c1f_364a7a40d192["recomputePluginOrdering()"] 3b29f8fc_9a36_ab97_6c1f_364a7a40d192 -->|calls| 9ec49b43_49aa_a060_cf73_319f3806fbec 12edc0f0_2f77_0ce9_d3ba_d9a9702013c6["publishRegistrationName()"] 9ec49b43_49aa_a060_cf73_319f3806fbec -->|calls| 12edc0f0_2f77_0ce9_d3ba_d9a9702013c6 style 9ec49b43_49aa_a060_cf73_319f3806fbec fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-native-renderer/src/legacy-events/EventPluginRegistry.js lines 92–129
function publishEventForPlugin(
dispatchConfig: DispatchConfig,
pluginModule: LegacyPluginModule<AnyNativeEvent>,
eventName: string,
): boolean {
if (eventNameDispatchConfigs.hasOwnProperty(eventName)) {
throw new Error(
'EventPluginRegistry: More than one plugin attempted to publish the same ' +
`event name, \`${eventName}\`.`,
);
}
eventNameDispatchConfigs[eventName] = dispatchConfig;
const phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
if (phasedRegistrationNames) {
for (const phaseName in phasedRegistrationNames) {
if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
// $FlowFixMe[invalid-computed-prop]
const phasedRegistrationName = phasedRegistrationNames[phaseName];
publishRegistrationName(
phasedRegistrationName,
pluginModule,
eventName,
);
}
}
return true;
} else if (dispatchConfig.registrationName) {
publishRegistrationName(
dispatchConfig.registrationName,
pluginModule,
eventName,
);
return true;
}
return false;
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does publishEventForPlugin() do?
publishEventForPlugin() is a function in the react codebase, defined in packages/react-native-renderer/src/legacy-events/EventPluginRegistry.js.
Where is publishEventForPlugin() defined?
publishEventForPlugin() is defined in packages/react-native-renderer/src/legacy-events/EventPluginRegistry.js at line 92.
What does publishEventForPlugin() call?
publishEventForPlugin() calls 1 function(s): publishRegistrationName.
What calls publishEventForPlugin()?
publishEventForPlugin() is called by 1 function(s): recomputePluginOrdering.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free