@samitouri / QOS-React-1 / commits / 99da76f23a

fix[react-devtools] remove native inspection button when it can't be used (#29779)

## Summary There's no native inspection available in any of the React-Native devtools: * **React DevTools in Fusebox** * **React DevTools standalone** Besides, **React DevTools Inline** can't really open the devtools and point to the native inspector because of lack of an API to do that. Only **React DevTools extension** can actually do that. That's why I've disabled it for the first 3 flavours of React DevTools mentioned above. ## How did you test this change? Still enabled on **React DevTools extension** <img width="1355" alt="Screenshot 2024-06-06 at 16 09 21" src="https://github.com/facebook/react/assets/5188459/a9b658a6-eafe-443c-9298-280bb9f4ed72"> Disabled on **React DevTools in Fusebox** <img width="1670" alt="Screenshot 2024-06-06 at 16 04 28" src="https://github.com/facebook/react/assets/5188459/a2ded76f-2aaf-47ce-b581-611494ca33bd"> Disabled on **React DevTools standalone** <img width="1268" alt="Screenshot 2024-06-06 at 16 15 08" src="https://github.com/facebook/react/assets/5188459/eb2f308d-32cb-43ea-921b-3503aa874d64"> Disabled on **React DevTools Inline** <img width="1206" alt="Screenshot 2024-06-06 at 16 09 26" src="https://github.com/facebook/react/assets/5188459/03da741a-66bf-4414-91f7-2f344c78a880">

Vitali Zaidman committed Jun 6, 2024 at 17:10 UTC 99da76f23ac85d279457470f8fb19a9b2f173ed0
3 files changed +3 -3
packages/react-devtools-core/src/standalone.js
+1 -1
@@ -279,7 +279,7 @@ function initialize(socket: WebSocket) {
279 // $FlowFixMe[incompatible-call] found when upgrading Flow
280 store = new Store(bridge, {
281 checkBridgeProtocolCompatibility: true,
282 - supportsNativeInspection: true,
282 + supportsNativeInspection: false,
283 supportsTraceUpdates: true,
284 });
285
packages/react-devtools-fusebox/src/frontend.js
+1 -1
@@ -37,7 +37,7 @@ export function createStore(bridge: FrontendBridge, config?: Config): Store {
37 return new Store(bridge, {
38 checkBridgeProtocolCompatibility: true,
39 supportsTraceUpdates: true,
40 - supportsNativeInspection: true,
40 + supportsNativeInspection: false,
41 ...config,
42 });
43 }
packages/react-devtools-inline/src/frontend.js
+1 -1
@@ -23,7 +23,7 @@ export function createStore(bridge: FrontendBridge, config?: Config): Store {
23 checkBridgeProtocolCompatibility: true,
24 supportsTraceUpdates: true,
25 supportsTimeline: true,
26 - supportsNativeInspection: true,
26 + supportsNativeInspection: false,
27 ...config,
28 });
29 }