diff --git a/packages/react-native-renderer/src/ReactFabric.js b/packages/react-native-renderer/src/ReactFabric.js index 9e2c82548d..130b199580 100644 --- a/packages/react-native-renderer/src/ReactFabric.js +++ b/packages/react-native-renderer/src/ReactFabric.js @@ -118,28 +118,6 @@ const ReactFabric: ReactFabricType = { }, }; -if (__DEV__) { - // $FlowFixMe - Object.assign( - ReactFabric.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, - { - // TODO: none of these work since Fiber. Remove these dependencies. - // Used by RCTRenderingPerf, Systrace: - ReactDebugTool: { - addHook() {}, - removeHook() {}, - }, - // Used by ReactPerfStallHandler, RCTRenderingPerf: - ReactPerf: { - start() {}, - stop() {}, - printInclusive() {}, - printWasted() {}, - }, - }, - ); -} - ReactFabricRenderer.injectIntoDevTools({ findFiberByHostInstance: ReactNativeComponentTree.getClosestInstanceFromNode, getInspectorDataForViewTag: getInspectorDataForViewTag, diff --git a/packages/react-native-renderer/src/ReactNativeRenderer.js b/packages/react-native-renderer/src/ReactNativeRenderer.js index ce55def9e6..7b5f3c7805 100644 --- a/packages/react-native-renderer/src/ReactNativeRenderer.js +++ b/packages/react-native-renderer/src/ReactNativeRenderer.js @@ -147,28 +147,6 @@ const ReactNativeRenderer: ReactNativeType = { }, }; -if (__DEV__) { - // $FlowFixMe - Object.assign( - ReactNativeRenderer.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, - { - // TODO: none of these work since Fiber. Remove these dependencies. - // Used by RCTRenderingPerf, Systrace: - ReactDebugTool: { - addHook() {}, - removeHook() {}, - }, - // Used by ReactPerfStallHandler, RCTRenderingPerf: - ReactPerf: { - start() {}, - stop() {}, - printInclusive() {}, - printWasted() {}, - }, - }, - ); -} - ReactNativeFiberRenderer.injectIntoDevTools({ findFiberByHostInstance: ReactNativeComponentTree.getClosestInstanceFromNode, getInspectorDataForViewTag: getInspectorDataForViewTag, diff --git a/packages/react-native-renderer/src/ReactNativeTypes.js b/packages/react-native-renderer/src/ReactNativeTypes.js index 70a3203658..c38b0b44eb 100644 --- a/packages/react-native-renderer/src/ReactNativeTypes.js +++ b/packages/react-native-renderer/src/ReactNativeTypes.js @@ -89,9 +89,7 @@ export type NativeMethodsMixinType = { type SecretInternalsType = { NativeMethodsMixin: NativeMethodsMixinType, - ReactDebugTool?: any, ReactNativeComponentTree: any, - ReactPerf?: any, computeComponentStackForErrorReporting(tag: number): string, // TODO (bvaughn) Decide which additional types to expose here? // And how much information to fill in for the above types. diff --git a/scripts/rollup/shims/react-native/ReactDebugTool.js b/scripts/rollup/shims/react-native/ReactDebugTool.js deleted file mode 100644 index edde3b629e..0000000000 --- a/scripts/rollup/shims/react-native/ReactDebugTool.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow - */ - -'use strict'; - -const { - __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, -} = require('ReactNative'); - -module.exports = - __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactDebugTool; diff --git a/scripts/rollup/shims/react-native/ReactPerf.js b/scripts/rollup/shims/react-native/ReactPerf.js deleted file mode 100644 index 637036afaf..0000000000 --- a/scripts/rollup/shims/react-native/ReactPerf.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow - */ - -'use strict'; - -const { - __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, -} = require('ReactNative'); - -module.exports = __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactPerf;