RNTester: Fixes turbo module examples error in bridgeless mode (#48362)

Summary:
In https://github.com/facebook/react-native/issues/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: https://github.com/facebook/react-native/pull/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
This commit is contained in:
zhongwuzw
2025-02-11 05:28:58 -08:00
committed by Facebook GitHub Bot
parent 18992d2ebe
commit 62831e740c
2 changed files with 2 additions and 2 deletions
@@ -261,7 +261,7 @@ class NativeCxxModuleExampleExample extends React.Component<{}, State> {
}
componentDidMount(): void {
if (global.__turboModuleProxy == null && global.nativeModuleProxy == null) {
if (global.nativeModuleProxy == null && global.nativeModuleProxy == null) {
throw new Error(
'Cannot load this example because TurboModule is not configured.',
);