This is the React Native DevTools frontend, a fork of Chrome DevTools.
Changes should generally be scoped to the front_end/ directory. Do not edit front_end/generated/.
- Make minimal edits. No speculative refactors.
- Use
.jsextensions in TypeScript imports. Usetypeimports where possible (import type). - New files in Meta-owned paths must prepend
// Copyright (c) Meta Platforms, Inc. and affiliates.as the first line of the license header, above the Chromium Authors license. Keep in sync withMETA_CODE_PATHSinscripts/eslint_rules/lib/check-license-header.js.
Each module directory has a BUILD.gn file. Update these when adding new files or dependencies.
generate_css("css_files")— lists.csssource files.devtools_module("name")— lists.tssource files insourcesand dependencies as:bundlerefs indeps.devtools_entrypoint("bundle")— declares the barrel file that re-exports the module's public API.devtools_entrypoint("meta")— declares the-meta.tsfile that registers panels/views. Usevisibilityto restrict to specific entrypoints.ts_library("unittests")— lists.test.tsfiles withtestonly = true.
- UI components extend
HTMLElement, use Lithtmltemplates (fromfront_end/ui/lit/lit.js), and locate styles in one adjacent CSS file. Prefix custom elements withdevtools-. Example:front_end/ui/components/cards/Card.ts. - Panels extend
UI.Widget.VBoxand are registered via a-meta.tsfile usingUI.ViewManager.registerViewExtension(), which lazily loads the panel implementation. - Entrypoints:
front_end/entrypoints/rn_fusebox/is the primary React Native entry point. - RN-specific code lives in paths listed in
META_CODE_PATHS(e.g.panels/rn_welcome/,panels/react_devtools/,models/react_native/,core/rn_experiments/).