@samitouri / QOS-React-2 / commits / ab4280b3e9

Don't expose ReactGlobalSharedState on React Native renderer (#12298)

* Don't expose ReactGlobalSharedState on React Native renderer We should just go through the "react" package if need access to this one. Removed the dependencies in React Native. * No longer used by InspectorUtils

Sebastian Markbåge committed Feb 27, 2018 at 07:57 UTC ab4280b3e98dbb97d3e753083dab19879167c3f5
3 files changed +2 -23
packages/react-native-renderer/src/ReactFabric.js
+1 -3
@@ -15,7 +15,6 @@ import './ReactFabricInjection';
15 import * as ReactPortal from 'shared/ReactPortal';
16 import * as ReactGenericBatching from 'events/ReactGenericBatching';
17 import TouchHistoryMath from 'events/TouchHistoryMath';
18 -import * as ReactGlobalSharedState from 'shared/ReactGlobalSharedState';
18 import ReactVersion from 'shared/ReactVersion';
19
20 import NativeMethodsMixin from './NativeMethodsMixin';
@@ -86,8 +85,7 @@ const ReactFabric: ReactNativeType = {
85 NativeMethodsMixin,
86 // Used by react-native-github/Libraries/ components
87 ReactNativeBridgeEventPlugin, // requireNativeComponent
89 - ReactGlobalSharedState, // Systrace
90 - ReactNativeComponentTree, // InspectorUtils, ScrollResponder
88 + ReactNativeComponentTree, // ScrollResponder
89 ReactNativePropRegistry, // flattenStyle, Stylesheet
90 TouchHistoryMath, // PanResponder
91 createReactNativeComponentClass, // RCTText, RCTView, ReactNativeART
packages/react-native-renderer/src/ReactNativeRenderer.js
+1 -3
@@ -15,7 +15,6 @@ import './ReactNativeInjection';
15 import * as ReactPortal from 'shared/ReactPortal';
16 import * as ReactGenericBatching from 'events/ReactGenericBatching';
17 import TouchHistoryMath from 'events/TouchHistoryMath';
18 -import * as ReactGlobalSharedState from 'shared/ReactGlobalSharedState';
18 import ReactVersion from 'shared/ReactVersion';
19 // Module provided by RN:
20 import UIManager from 'UIManager';
@@ -95,8 +94,7 @@ const ReactNativeRenderer: ReactNativeType = {
94 NativeMethodsMixin,
95 // Used by react-native-github/Libraries/ components
96 ReactNativeBridgeEventPlugin, // requireNativeComponent
98 - ReactGlobalSharedState, // Systrace
99 - ReactNativeComponentTree, // InspectorUtils, ScrollResponder
97 + ReactNativeComponentTree, // ScrollResponder
98 ReactNativePropRegistry, // flattenStyle, Stylesheet
99 TouchHistoryMath, // PanResponder
100 createReactNativeComponentClass, // RCTText, RCTView, ReactNativeART
scripts/rollup/shims/react-native/ReactGlobalSharedState.js deleted
-17
@@ -1,17 +0,0 @@
1 -/**
2 - * Copyright (c) 2013-present, Facebook, Inc.
3 - *
4 - * This source code is licensed under the MIT license found in the
5 - * LICENSE file in the root directory of this source tree.
6 - *
7 - * @providesModule ReactGlobalSharedState
8 - */
9 -
10 -'use strict';
11 -
12 -const {
13 - __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
14 -} = require('ReactNative');
15 -
16 -module.exports =
17 - __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactGlobalSharedState;