Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/56706 Addresses an issue where on macOS, we briefly flashed the RNDT app icon in the Dock. (This has been raised to us recently by Expo.) **More info** The `unstable_prepareDebuggerShell` health check was spawning the Electron binary with `--version` after a successful `dotslash fetch`. Invoking the native binary causes the app icon flash. - I couldn't find an Electron-side way to eliminate this (e.g. headless). - DotSlash already performs mandatory verification of every fetched artifact. The additional `--version` spawn was therefore redundant/overkill. Changelog: [General][Fixed] - React Native DevTools will no longer briefly flash in the system dock/taskbar when starting Metro Reviewed By: cortinico Differential Revision: D104061238 fbshipit-source-id: 5baafbc9a452438bb6ddcfb584975cae12618e0c
@react-native/debugger-shell
Experimental Electron-based shell for React Native DevTools. This package is not part of React Native's public API.
Why Electron?
The React Native DevTools frontend is based on Chrome DevTools, which is a web app, but is not particularly portable: it's designed to run in Chromium, and Chromium only. Prior to @react-native/debugger-shell, we would run it in hosted mode in an instance of Chrome or Edge.
Relying on hosted mode presents a variety of UX issues in the debugging workflow, such as the need to ask developers to install a particular browser before they can debug in React Native, and the inability to foreground/reuse existing debugger windows when relaunching the debugger for the same app. In order to address these issues effectively, we fundamentally need to leave the browser sandbox and run the debugger in a shell we can bundle with React Native, and whose behavior we can control.
Electron is a tried-and-tested framework for the specific task of embedding a Chromium browser in a portable, customized shell. As a rule we'll hold a high bar for performance and reliability, and we'll only add features to the shell if they are strictly necessary to complement the DevTools frontend's built-in capabilities.