Skip to content

Commit 28fc4f8

Browse files
authored
[docs] Add feature summaries for RNDT Network and Performance panels (facebook#4928)
1 parent f2293e8 commit 28fc4f8

File tree

2 files changed

+69
-1
lines changed

2 files changed

+69
-1
lines changed

docs/react-native-devtools.md

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import con
77

88
React Native DevTools is our modern debugging experience for React Native. Purpose-built from the ground up, it aims to be fundamentally more integrated, correct, and reliable than previous debugging methods.
99

10-
![React Native DevTools opened to the "Welcome" pane](/docs/assets/debugging-rndt-welcome.jpg)
10+
![React Native DevTools opened to the "Welcome" pane](/docs/assets/debugging-rndt-welcome-083.jpg)
1111

1212
React Native DevTools is designed for debugging React app concerns, and not to replace native tools. If you want to inspect React Native’s underlying platform layers (for example, while developing a Native Module), please use the debugging tools available in Android Studio and Xcode (see [Debugging Native Code](/docs/debugging-native-code)).
1313

@@ -79,6 +79,70 @@ Breakpoints are a fundamental tool in your debugging toolkit!
7979
- Use a `debugger;` statement to quickly set a breakpoint from your text editor. This will reach the device immediately via Fast Refresh.
8080
- There are multiple kinds of breakpoints! For example, [Conditional Breakpoints and Logpoints](https://developer.chrome.com/docs/devtools/javascript/breakpoints#overview).
8181

82+
### Network <div className="label primary">Since 0.83</div>
83+
84+
![A network request in the React Native DevTools Network panel](/docs/assets/debugging-rndt-network.jpg)
85+
86+
The Network panel allows you to view and inspect the network requests made by your app. Logged requests provide detailed metadata such as timings and headers sent/received, as well as response previews.
87+
88+
Network requests are recorded automatically when DevTools is open. We support most features from Chrome, with some exceptions. See more below.
89+
90+
<details>
91+
<summary><strong>💡 Network event coverage, Expo support</strong></summary>
92+
93+
**Which network events are captured?**
94+
95+
Today, we record all network calls through `fetch()`, `XMLHttpRequest`, and `<Image>` — with support for custom networking libraries, such as Expo Fetch, coming later.
96+
97+
**Expo Network differences**
98+
99+
Because of this, apps using Expo will continue to see the "Expo Network" panel — a separate implementation by the Expo framework which will log these additional request sources but has slightly reduced features.
100+
101+
- Coverage for Expo-specific network events.
102+
- No request initiator support.
103+
- No Performance panel integration.
104+
105+
We're working with Expo to integrate Expo Fetch and third party networking libraries with our new Network inspection pipeline in future releases.
106+
107+
**Unimplemented features**
108+
109+
At launch, these are the features we don't yet support in React Native:
110+
111+
- WebSocket events
112+
- Network response mocking
113+
- Simulated network throttling
114+
115+
</details>
116+
117+
<details>
118+
<summary><strong>💡 Response previews buffer size</strong></summary>
119+
120+
If you are inspecting a large volume of response data, please note that response previews are cached in an on-device buffer with a maximum size of 100MB. This means we may evict response previews (but not metadata) if the cache becomes too large, oldest request first.
121+
122+
</details>
123+
124+
#### Useful tips
125+
126+
- Use the Initiator tab to see the call stack of where a network request was initiated in your app.
127+
- Network events will also be shown in the Network track in the Performance panel.
128+
129+
### Performance <div className="label primary">Since 0.83</div>
130+
131+
![A performance trace in the React Native DevTools Performance panel](/docs/assets/debugging-rndt-performance.jpg)
132+
133+
Performance tracing allows you to record a performance session within your app to understand how your JavaScript code is running and what operations took the most time. In React Native, we show JavaScript execution, React Performance tracks, Network events, and custom [User Timings](https://developer.mozilla.org/en-US/docs/Web/API/Performance_API/User_timing), rendered in a single performance timeline.
134+
135+
#### Useful tips
136+
137+
- Use [Annotations](https://developer.chrome.com/docs/devtools/performance/annotations) to label and mark up a performance trace — useful before [downloading and sharing](https://developer.chrome.com/docs/devtools/performance/save-trace) with a teammate.
138+
- Use the [`PerformanceObserver` API](./global-PerformanceObserver.md) in your app to observe performance events at runtime — useful if you want to capture performance telemetry.
139+
140+
#### Learn more
141+
142+
- [React Performance tracks](https://react.dev/reference/dev-tools/react-performance-tracks)
143+
- [Performance APIs > User Timings | MDN](https://developer.mozilla.org/en-US/docs/Web/API/Performance_API/User_timing)
144+
- ["Debug Like a Senior — React Native Performance Panel" | Software Mansion](https://blog.swmansion.com/react-native-debugging-new-performance-panel-in-react-native-0-83-21ca90871f6d)
145+
82146
### Memory
83147

84148
![Inspecting a heap snapshot in the Memory panel](/docs/assets/debugging-rndt-memory.jpg)

website/src/css/customTheme.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1901,6 +1901,10 @@ td .color-box {
19011901
}
19021902

19031903
/* Label variants */
1904+
&.primary {
1905+
background: var(--ifm-color-primary);
1906+
}
1907+
19041908
&.android {
19051909
background: #a4c936;
19061910

0 commit comments

Comments
 (0)