Skip to content

Commit fb3affe

Browse files
committed
docs: simplify React Native setup guidance
Present the Metro integration as the standard React Native setup and keep version history in one compatibility note.
1 parent e8fa026 commit fb3affe

7 files changed

Lines changed: 24 additions & 23 deletions

File tree

.changeset/quiet-walls-connect.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
'agent-react-devtools': minor
33
---
44

5-
Add React Native 0.87+ support through a Metro config wrapper and native
6-
bootstrap entry. React Native apps now wrap their final Metro config and import
5+
Add React Native support through a Metro config wrapper and native bootstrap
6+
entry. React Native apps now wrap their final Metro config and import
77
`agent-react-devtools/react-native` from the application entry graph.

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,11 @@ Options:
241241
reactDevtools({ port: 8097, host: "localhost" });
242242
```
243243

244-
### React Native 0.87+
244+
### React Native
245245

246-
React Native 0.87 removed the legacy standalone React DevTools auto-connect
247-
path. Projects must now add the agent bootstrap to Metro explicitly:
246+
> Before React Native 0.87, standalone DevTools connected automatically without
247+
> code changes. React Native 0.87 removed that path, so the setup below is now
248+
> required.
248249
249250
```sh
250251
npm install --save-dev agent-react-devtools
@@ -322,17 +323,17 @@ launching the app:
322323
adb reverse tcp:8097 tcp:8097
323324
```
324325

325-
This integration connects only from a native development runtime and only on
326-
React Native 0.87 or newer. Native production builds exit without connecting;
327-
browser and default/server imports resolve to no-op modules.
326+
This integration connects only from a native development runtime. Native
327+
production builds exit without connecting; browser and default/server imports
328+
resolve to no-op modules.
328329

329330
If `status` reports zero connected apps:
330331

331332
1. Confirm both the Metro wrapper and graph import are present.
332333
2. Ensure `withAgentReactDevTools` wraps the final config, outside other Metro wrappers.
333334
3. Stop and restart Metro; if its cache is stale, use `--reset-cache` (bare) or `npx expo start -c`.
334335
4. Confirm the daemon is listening on 8097 and repeat `adb reverse` for Android devices.
335-
5. Check that the app is a development build running React Native 0.87+.
336+
5. Check that the app is a development build.
336337

337338
## Using with agent-browser
338339

examples/expo-app/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Expo Example App
22

3-
A minimal Expo app showing the React Native 0.87+ `agent-react-devtools`
3+
A minimal Expo app showing the React Native `agent-react-devtools`
44
configuration.
55

66
> This fixture currently uses React Native 0.81.5, so its client-side version
77
> guard intentionally makes the bootstrap a no-op. It validates the Metro and
8-
> application configuration shape, but does not validate the React Native 0.87
9-
> runtime connection.
8+
> application configuration shape, but does not validate the runtime
9+
> connection.
1010
1111
## Setup
1212

@@ -26,8 +26,8 @@ The example already contains both required integration points:
2626
graph.
2727

2828
This checked-in React Native 0.81 fixture cannot test a live connection. To
29-
exercise the same configuration in an Expo project based on React Native 0.87
30-
or newer, restart Metro and run:
29+
exercise the same configuration in an Expo project where the bootstrap is
30+
active, restart Metro and run:
3131

3232
```sh
3333
# Terminal 1: Start the daemon

packages/agent-react-devtools/skills/react-devtools/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ agent-react-devtools status # Should show 1 connected app
167167
## Important Rules
168168

169169
- **Labels reset** when the app reloads or components unmount/remount. After a reload, use `wait --connected` then re-check with `get tree` or `find`.
170-
- **`status` first** — if status shows 0 connected apps, the React app is not connected. Web users may need to run `npx agent-react-devtools init`; React Native 0.87+ users need both manual steps in [setup.md](references/setup.md).
170+
- **`status` first** — if status shows 0 connected apps, the React app is not connected. Web users may need to run `npx agent-react-devtools init`; React Native users need both manual steps in [setup.md](references/setup.md).
171171
- **Headed browser required** — if using `agent-browser`, always use `--headed` mode. Headless Chromium does not properly load the devtools connect script.
172172
- **Profile while interacting** — profiling only captures renders that happen between `profile start` and `profile stop`. Make sure the relevant interaction happens during that window.
173173
- **Use `--depth`** on large trees — a deep tree can produce a lot of output. Start with `--depth 3` or `--depth 4` and go deeper only on the subtree you care about.

packages/agent-react-devtools/skills/react-devtools/references/setup.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,8 @@ Then imports it in `app/layout.tsx`.
5757
import 'agent-react-devtools/connect';
5858
```
5959

60-
### React Native 0.87+ / Expo
60+
### React Native / Expo
6161

62-
React Native 0.87 removed the legacy standalone DevTools auto-connect path.
6362
The Metro wrapper and entry-graph import below are both mandatory.
6463

6564
```bash
@@ -114,9 +113,9 @@ agent-react-devtools wait --connected --timeout 30
114113
agent-react-devtools status
115114
```
116115

117-
The client connects only from React Native 0.87+ native development runtimes.
118-
Native production builds exit without connecting; web and default/server
119-
imports resolve to no-op modules.
116+
The client connects only from native development runtimes. Native production
117+
builds exit without connecting; web and default/server imports resolve to
118+
no-op modules.
120119

121120
## Manual Web Setup
122121

packages/agent-react-devtools/src/__tests__/init.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ describe('runInit', () => {
200200
expect(content).toBe(original);
201201
});
202202

203-
it('prints manual React Native 0.87 setup without modifying files', async () => {
203+
it('prints manual React Native setup without modifying files', async () => {
204204
const packageJson = JSON.stringify({
205205
dependencies: { 'react-native': '^0.87.0' },
206206
});
@@ -216,7 +216,8 @@ describe('runInit', () => {
216216
await runInit(dir, true);
217217

218218
const output = log.mock.calls.flat().join('\n');
219-
expect(output).toContain('React Native 0.87+ requires manual setup');
219+
expect(output).toContain('React Native requires manual setup');
220+
expect(output).not.toContain('0.87');
220221
expect(output).toContain('npm install -D agent-react-devtools');
221222
expect(output).not.toContain('react-devtools-core');
222223
expect(output).toContain('withAgentReactDevTools');

packages/agent-react-devtools/src/init.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ export async function runInit(
362362
}
363363

364364
if (framework === 'react-native') {
365-
console.log('\nReact Native 0.87+ requires manual setup.');
365+
console.log('\nReact Native requires manual setup.');
366366
console.log('No files were changed by init.\n');
367367
console.log('1. Install agent-react-devtools:');
368368
console.log(' npm install -D agent-react-devtools\n');

0 commit comments

Comments
 (0)