Skip to content

Commit 99da76f

Browse files
authored
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">
1 parent 704aeed commit 99da76f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/react-devtools-core/src/standalone.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ function initialize(socket: WebSocket) {
279279
// $FlowFixMe[incompatible-call] found when upgrading Flow
280280
store = new Store(bridge, {
281281
checkBridgeProtocolCompatibility: true,
282-
supportsNativeInspection: true,
282+
supportsNativeInspection: false,
283283
supportsTraceUpdates: true,
284284
});
285285

packages/react-devtools-fusebox/src/frontend.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export function createStore(bridge: FrontendBridge, config?: Config): Store {
3737
return new Store(bridge, {
3838
checkBridgeProtocolCompatibility: true,
3939
supportsTraceUpdates: true,
40-
supportsNativeInspection: true,
40+
supportsNativeInspection: false,
4141
...config,
4242
});
4343
}

packages/react-devtools-inline/src/frontend.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function createStore(bridge: FrontendBridge, config?: Config): Store {
2323
checkBridgeProtocolCompatibility: true,
2424
supportsTraceUpdates: true,
2525
supportsTimeline: true,
26-
supportsNativeInspection: true,
26+
supportsNativeInspection: false,
2727
...config,
2828
});
2929
}

0 commit comments

Comments
 (0)