Skip to content

Commit

Permalink
Always enable TurboModuleExample for RN Tester
Browse files Browse the repository at this point in the history
Summary:
For some reason the turbomodule example inside RN Tester was not enabled by default. I'm enabling it.

Changelog:
[Internal] - Always enable TurboModuleExample for RN Tester

Reviewed By: cipolleschi

Differential Revision: D39381821

fbshipit-source-id: 711c20a51a2f3b274f1b9396d00898b0f60a6f86
  • Loading branch information
cortinico authored and facebook-github-bot committed Sep 9, 2022
1 parent 737ce36 commit 54e50ea
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions packages/rn-tester/js/utils/RNTesterList.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,15 +279,12 @@ const APIs: Array<RNTesterModuleInfo> = [
category: 'Basic',
module: require('../examples/XHR/XHRExample'),
},
];

if (global.__turboModuleProxy) {
APIs.push({
{
key: 'TurboModuleExample',
category: 'Basic',
module: require('../examples/TurboModule/TurboModuleExample'),
});
}
},
];

if (ReactNativeFeatureFlags.shouldEmitW3CPointerEvents()) {
APIs.push({
Expand Down

3 comments on commit 54e50ea

@NickGerleman
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was to avoid showing the example when web debugging, since it would just crash in that case.

@cortinico
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually it was because we have no way to turn off TM on Android. Should we add it?

@NickGerleman
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's probably fine. Back when the default for RNW Playground was web debugging (it no longer is), I remember this example being a point of contention because it would crash in the default case. RNW did not have logic to disable web debugging when TMs were used in RNTester. But that is not an issue anymore.

Please sign in to comment.