mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Whenever we do this, Rollup needs to materialize this as an object. This causes it to also add the Babel compatibility property which is unnecessary bloat. However, since when we use these, we leak the object this often also deopts any compiler optimizations. If we really need an object we should export default an object. Currently there is an exception for DOMTopLevelEventTypes since listing out the imports is a PITA and it doesn't escape so it should get properly inlined. We should probably move to a different pattern to avoid this for consistency though.
30 lines
775 B
JavaScript
30 lines
775 B
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @flow
|
|
*/
|
|
|
|
import './ReactNativeInjectionShared';
|
|
|
|
import {
|
|
getFiberCurrentPropsFromNode,
|
|
getInstanceFromNode,
|
|
getNodeFromInstance,
|
|
} from './ReactFabricComponentTree';
|
|
import {setComponentTree} from 'events/EventPluginUtils';
|
|
import ReactFabricGlobalResponderHandler from './ReactFabricGlobalResponderHandler';
|
|
import ResponderEventPlugin from 'events/ResponderEventPlugin';
|
|
|
|
setComponentTree(
|
|
getFiberCurrentPropsFromNode,
|
|
getInstanceFromNode,
|
|
getNodeFromInstance,
|
|
);
|
|
|
|
ResponderEventPlugin.injection.injectGlobalResponderHandler(
|
|
ReactFabricGlobalResponderHandler,
|
|
);
|