Skip to content

Commit 2913463

Browse files
author
Brandon Dail
committed
Re-export injectEventPluginsByName from ReactDOM internals
1 parent 3575ab7 commit 2913463

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

packages/react-dom/src/client/ReactDOM.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,7 @@ const ReactDOM: Object = {
745745
ReactDOMComponentTree.getInstanceFromNode,
746746
ReactDOMComponentTree.getNodeFromInstance,
747747
ReactDOMComponentTree.getFiberCurrentPropsFromNode,
748+
EventPluginHub.injection.injectEventPluginsByName,
748749
EventPluginRegistry.eventNameDispatchConfigs,
749750
EventPropagators.accumulateTwoPhaseDispatches,
750751
EventPropagators.accumulateDirectDispatches,

packages/react-dom/src/test-utils/ReactTestUtils.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ const [
3232
getNodeFromInstance,
3333
getFiberCurrentPropsFromNode,
3434
/* eslint-enable no-unused-vars */
35+
injectEventPluginsByName,
36+
/* eslint-enable no-unused-vars */
3537
eventNameDispatchConfigs,
3638
accumulateTwoPhaseDispatches,
3739
accumulateDirectDispatches,

packages/react-dom/src/unstable-native-dependencies/ReactDOMUnstableNativeDependencies.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,23 @@ import * as EventPluginUtils from 'events/EventPluginUtils';
1111
import ResponderEventPlugin from 'events/ResponderEventPlugin';
1212
import ResponderTouchHistoryStore from 'events/ResponderTouchHistoryStore';
1313

14-
export {ResponderEventPlugin, ResponderTouchHistoryStore, EventPluginHub};
15-
1614
// Inject react-dom's ComponentTree into this module.
1715
// Keep in sync with ReactDOM.js and ReactTestUtils.js:
1816
const [
1917
getInstanceFromNode,
2018
getNodeFromInstance,
2119
getFiberCurrentPropsFromNode,
20+
injectEventPluginsByName,
2221
] = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events;
22+
2323
EventPluginUtils.setComponentTree(
2424
getFiberCurrentPropsFromNode,
2525
getInstanceFromNode,
2626
getNodeFromInstance,
2727
);
28+
29+
export {
30+
ResponderEventPlugin,
31+
ResponderTouchHistoryStore,
32+
injectEventPluginsByName,
33+
};

0 commit comments

Comments
 (0)