Skip to content

Commit 62831e7

Browse files
zhongwuzwfacebook-github-bot
authored andcommitted
RNTester: Fixes turbo module examples error in bridgeless mode (#48362)
Summary: In #47598 , we removed `__turboModuleProxy ` in bridgeless mode, it would produce error in rntester turbomodule examples, fix it by change `__turboModuleProxy` to `nativeModuleProxy`. RSNara can you please help to review? :) before: ![image](https://github.com/user-attachments/assets/bf8edc50-6dbc-4465-9936-36ec9112761b) After: ![image](https://github.com/user-attachments/assets/2d5c1546-d758-4692-a9a7-5cf195edc015) ## Changelog: [IOS] [FIXED] - RNTester: Fixes turbo module examples error in bridgeless mode Pull Request resolved: #48362 Test Plan: RNTester turbomodule examples in bridgeless can work as expected. Reviewed By: shwanton Differential Revision: D67603884 Pulled By: cortinico fbshipit-source-id: d905fa0535da5fde5e7ebff1d453ea761be9f42f
1 parent 18992d2 commit 62831e7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/rn-tester/js/examples/TurboModule/NativeCxxModuleExampleExample.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ class NativeCxxModuleExampleExample extends React.Component<{}, State> {
261261
}
262262

263263
componentDidMount(): void {
264-
if (global.__turboModuleProxy == null && global.nativeModuleProxy == null) {
264+
if (global.nativeModuleProxy == null && global.nativeModuleProxy == null) {
265265
throw new Error(
266266
'Cannot load this example because TurboModule is not configured.',
267267
);

packages/rn-tester/js/examples/TurboModule/SampleTurboModuleExample.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ class SampleTurboModuleExample extends React.Component<{}, State> {
204204
}
205205

206206
componentDidMount(): void {
207-
if (global.__turboModuleProxy == null && global.nativeModuleProxy == null) {
207+
if (global.nativeModuleProxy == null && global.nativeModuleProxy == null) {
208208
throw new Error(
209209
'Cannot load this example because TurboModule is not configured.',
210210
);

0 commit comments

Comments
 (0)