|
| 1 | +--- |
| 2 | +title: Removing the "Perf" and "Network" tabs from the in-app Element Inspector |
| 3 | +author: |
| 4 | +- Alex Hunt <huntie@meta.com> |
| 5 | +date: 2024-04-04 |
| 6 | +--- |
| 7 | + |
| 8 | +# RFC0777: Removing the "Perf" and "Network" tabs from the in-app Element Inspector |
| 9 | + |
| 10 | +## Summary |
| 11 | + |
| 12 | +This RFC identifies two sub-features of the in-app Element Inspector which we believe are **not worth reimplementing** under the New Architecture. |
| 13 | + |
| 14 | +**Proposed features to remove** |
| 15 | + |
| 16 | +These will not be available under the New Architecture. |
| 17 | + |
| 18 | +- Element Inspector > Perf |
| 19 | +- Element Inspector > Network |
| 20 | + |
| 21 | +**Proposed features to keep (no change)** |
| 22 | + |
| 23 | +- Element Inspector > Inspect |
| 24 | +- Element Inspector > Touchables |
| 25 | + |
| 26 | +## Motivation |
| 27 | + |
| 28 | +As the React team focuses on the New Architecture and Debugging, we are reviewing the current development tooling we offer. |
| 29 | + |
| 30 | +The in-app Element Inspector is a longstanding development feature in React Native, which helps developers visually understand the element hierarchy in their app via tap interaction and through its React DevTools integration. However, its UI also houses some adjacent features which are unrelated to this purpose, are ambiguous with other built-in tools, and have been little-maintained. |
| 31 | + |
| 32 | +As we build out the New Architecture, we need to consider the usefulness of these features and the cost of adapting and maintaining these against the Bridgeless model. So, we are considering the removal of both the **Perf** and **Network** features under the Element Inspector overlay, under the New Architecture. |
| 33 | + |
| 34 | +- Under the current architecture: Leave these features in place. |
| 35 | +- Under the New Architecture: Do not reimplement these features, removing the "Perf" and "Network" buttons. |
| 36 | + |
| 37 | +## Detailed design |
| 38 | + |
| 39 | +### Legacy features to remove |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | +#### 1. Element Inspector > Perf |
| 44 | + |
| 45 | +Functionality: Textual logs of network requests with request duration. Non-interactive, no scrolling. |
| 46 | + |
| 47 | +A "Perf" tool here is ambiguous with the "Perf Monitor" feature we provide in the Dev Menu (which displays a standalone performance overlay), additionally motivating its removal. |
| 48 | + |
| 49 | +#### 2. Element Inspector > Network |
| 50 | + |
| 51 | +Functionality: A table view of HTTP requests made from the application. Non-interactive. |
| 52 | + |
| 53 | +### Replacing these features |
| 54 | + |
| 55 | +The functionality and value of both of these tabs is limited, providing basic visibility into network events. We believe there is better tooling, both today and in our future Debugging plans, that encapsulate these offerings. |
| 56 | + |
| 57 | +- Replacement tooling (today): native network inspectors (e.g. Charles Proxy), Network panel (web), console logs. |
| 58 | +- Replacement tooling (future): Fully functional Network panel in Chrome DevTools (**available in Expo today**). |
| 59 | + |
| 60 | +### Legacy features to keep (input wanted) |
| 61 | + |
| 62 | +We believe that the below tabs within the Element Inspector are a combination of more useful, relevant, and popular than the "Perf" or "Network" panels. |
| 63 | + |
| 64 | +- Element Inspector > Inspect |
| 65 | +- Element Inspector > Touchables |
| 66 | + |
| 67 | +There is some replacement tooling for these features, e.g. element highlighting from React DevTools, and native view inspection in Xcode/Android Studio. |
| 68 | + |
| 69 | +## Adoption strategy |
| 70 | + |
| 71 | +None, remove these features for the New Architecture. |
| 72 | + |
| 73 | +## How we teach this |
| 74 | + |
| 75 | +In a future release announcement that includes the full New Architecture by default, note this change. |
0 commit comments