createOrGetPooledEvent() — react Function Reference
Architecture documentation for the createOrGetPooledEvent() function in SyntheticEvent.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD bd7422a8_7e7c_b3a1_3f3d_44b571c9f652["createOrGetPooledEvent()"] a47c9419_7313_73d9_a24c_401cd8fd59b8["SyntheticEvent.js"] bd7422a8_7e7c_b3a1_3f3d_44b571c9f652 -->|defined in| a47c9419_7313_73d9_a24c_401cd8fd59b8 style bd7422a8_7e7c_b3a1_3f3d_44b571c9f652 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-native-renderer/src/legacy-events/SyntheticEvent.js lines 300–324
function createOrGetPooledEvent(
dispatchConfig,
targetInst,
nativeEvent,
nativeInst,
) {
const EventConstructor = this;
if (EventConstructor.eventPool.length) {
const instance = EventConstructor.eventPool.pop();
EventConstructor.call(
instance,
dispatchConfig,
targetInst,
nativeEvent,
nativeInst,
);
return instance;
}
return new EventConstructor(
dispatchConfig,
targetInst,
nativeEvent,
nativeInst,
);
}
Domain
Subdomains
Source
Frequently Asked Questions
What does createOrGetPooledEvent() do?
createOrGetPooledEvent() is a function in the react codebase, defined in packages/react-native-renderer/src/legacy-events/SyntheticEvent.js.
Where is createOrGetPooledEvent() defined?
createOrGetPooledEvent() is defined in packages/react-native-renderer/src/legacy-events/SyntheticEvent.js at line 300.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free