Skip to content

feat: restore React Native DevTools connections#58

Open
V3RON wants to merge 8 commits into
mainfrom
feature/react-native-087-connect
Open

feat: restore React Native DevTools connections#58
V3RON wants to merge 8 commits into
mainfrom
feature/react-native-087-connect

Conversation

@V3RON

@V3RON V3RON commented Jul 13, 2026

Copy link
Copy Markdown

What is this?

This PR restores agent-react-devtools connectivity for React Native after React Native removed the legacy standalone React DevTools auto-connect path. It adds an explicit Metro/client integration, updates init guidance, and documents the current setup for bare React Native and Expo projects.

How does it work?

Projects install agent-react-devtools, wrap their final Metro config with withAgentReactDevTools, and import agent-react-devtools/react-native from the application entry graph. Metro schedules the bootstrap after React Native initialization and before the app entry. On the client, the bootstrap runs only in development on supported native React Native versions, uses React Native's existing react-devtools-core dependency, derives the Metro host, tracks AppState, and connects to the daemon. Conditional exports keep web and non-React-Native consumers on a no-op module.

Why is this useful?

React Native users can keep using the agent CLI for component inspection and profiling without relying on the removed auto-connect implementation or installing React Native's internal DevTools dependency separately. The explicit setup avoids production and web connections, composes with existing Metro wrappers, and provides concise migration and troubleshooting guidance.

V3RON added 7 commits July 13, 2026 09:22
Restore the legacy DevTools socket connection removed in React Native 0.87 while preserving older runtimes' built-in connection.
Compose the native bootstrap after Metro's existing pre-main modules and publish both CommonJS and ESM entry points for React Native projects.
Explain the manual Metro and entry setup required for React Native 0.87+, and cover the built conditional exports with a lightweight package smoke test.
Document the required Metro wrapper and entry import, align the Expo example, and add a minor release note.
Pin React Native setup guidance and the Expo fixture to the DevTools core range used by React Native 0.87.
Rely on React Native's bundled react-devtools-core instead of asking users to install and version it separately.
Present the Metro integration as the standard React Native setup and keep version history in one compatibility note.
@V3RON V3RON changed the title feat: support React Native 0.87+ feat: restore React Native DevTools connections Jul 13, 2026
Configure supported React Native and Expo projects with reversible Metro and entry-graph edits.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant