[react-native] Always set RN$stopSurface (#26808)
## Summary To support incremental adoption of bridgeless logic we want to default to using these globals whenever they're available. ## How did you test this change? https://github.com/facebook/react-native/pull/37410
Pieter De Baets committed
May 12, 2023 at 16:14 UTC
a389046a529c6d22ba5895dd7f5d4b0b8d17c345
1 file changed
+3
-3
scripts/rollup/shims/react-native/ReactFabric.js
+3
-3
@@ -22,9 +22,9 @@ if (__DEV__) {
22
ReactFabric = require('../implementations/ReactFabric-prod');
23
}
24
25
-if (global.RN$Bridgeless) {
26
- global.RN$stopSurface = ReactFabric.stopSurface;
27
-} else {
25
+global.RN$stopSurface = ReactFabric.stopSurface;
26
+
27
+if (global.RN$Bridgeless !== true) {
28
BatchedBridge.registerCallableModule('ReactFabric', ReactFabric);
29
}
30