diff --git a/packages/react-native/Libraries/ReactNative/AppContainer-dev.js b/packages/react-native/Libraries/ReactNative/AppContainer-dev.js index 05c97b5d44de1a..cba0ccb2395dce 100644 --- a/packages/react-native/Libraries/ReactNative/AppContainer-dev.js +++ b/packages/react-native/Libraries/ReactNative/AppContainer-dev.js @@ -20,7 +20,6 @@ import View from '../Components/View/View'; import DebuggingOverlay from '../Debugging/DebuggingOverlay'; import useSubscribeToDebuggingOverlayRegistry from '../Debugging/useSubscribeToDebuggingOverlayRegistry'; import RCTDeviceEventEmitter from '../EventEmitter/RCTDeviceEventEmitter'; -import ReactDevToolsOverlay from '../Inspector/ReactDevToolsOverlay'; import LogBoxNotificationContainer from '../LogBox/LogBoxNotificationContainer'; import StyleSheet from '../StyleSheet/StyleSheet'; import {RootTagContext, createRootTag} from './RootTag'; @@ -64,6 +63,26 @@ const InspectorDeferred = ({ ); }; +type ReactDevToolsOverlayDeferredProps = { + inspectedViewRef: InspectedViewRef, + reactDevToolsAgent: ReactDevToolsAgent, +}; + +const ReactDevToolsOverlayDeferred = ({ + inspectedViewRef, + reactDevToolsAgent, +}: ReactDevToolsOverlayDeferredProps) => { + const ReactDevToolsOverlay = + require('../Inspector/ReactDevToolsOverlay').default; + + return ( + + ); +}; + const AppContainer = ({ children, fabric, @@ -155,7 +174,7 @@ const AppContainer = ({ {reactDevToolsAgent != null && ( -