From a389046a529c6d22ba5895dd7f5d4b0b8d17c345 Mon Sep 17 00:00:00 2001 From: Pieter De Baets Date: Fri, 12 May 2023 16:14:45 +0100 Subject: [PATCH] [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 --- scripts/rollup/shims/react-native/ReactFabric.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/rollup/shims/react-native/ReactFabric.js b/scripts/rollup/shims/react-native/ReactFabric.js index c1889f353e..417c156c2f 100644 --- a/scripts/rollup/shims/react-native/ReactFabric.js +++ b/scripts/rollup/shims/react-native/ReactFabric.js @@ -22,9 +22,9 @@ if (__DEV__) { ReactFabric = require('../implementations/ReactFabric-prod'); } -if (global.RN$Bridgeless) { - global.RN$stopSurface = ReactFabric.stopSurface; -} else { +global.RN$stopSurface = ReactFabric.stopSurface; + +if (global.RN$Bridgeless !== true) { BatchedBridge.registerCallableModule('ReactFabric', ReactFabric); }