[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
This commit is contained in:
Pieter De Baets 2023-05-12 16:14:45 +01:00 committed by GitHub
parent 67a05d03e3
commit a389046a52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -22,9 +22,9 @@ if (__DEV__) {
ReactFabric = require('../implementations/ReactFabric-prod'); ReactFabric = require('../implementations/ReactFabric-prod');
} }
if (global.RN$Bridgeless) {
global.RN$stopSurface = ReactFabric.stopSurface; global.RN$stopSurface = ReactFabric.stopSurface;
} else {
if (global.RN$Bridgeless !== true) {
BatchedBridge.registerCallableModule('ReactFabric', ReactFabric); BatchedBridge.registerCallableModule('ReactFabric', ReactFabric);
} }