Skip to content

Commit 9f51a0c

Browse files
philIipfacebook-github-bot
authored andcommitted
hook up unstable_enableSyncVoidMethods to ReactFeatureFlags (facebook#39988)
Summary: Pull Request resolved: facebook#39988 Changelog: [Internal] in this pr, we integrate the sync void configuration with our feature flag infra Reviewed By: luluwu2032 Differential Revision: D50030743 fbshipit-source-id: 03505e5e1f74aa90dc16f33fa4e93f9de9660dae
1 parent 2e16785 commit 9f51a0c

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactPackageTurboModuleManagerDelegate.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ interface ModuleProvider {
4242
mShouldEnableLegacyModuleInterop
4343
&& ReactFeatureFlags.unstable_useTurboModuleInteropForAllTurboModules;
4444

45+
private final boolean mEnableTurboModuleSyncVoidMethods =
46+
ReactFeatureFlags.unstable_enableTurboModuleSyncVoidMethods;
47+
4548
protected ReactPackageTurboModuleManagerDelegate() {
4649
super();
4750
}
@@ -140,6 +143,10 @@ public boolean unstable_shouldRouteTurboModulesThroughLegacyModuleInterop() {
140143
return mShouldRouteTurboModulesThroughLegacyModuleInterop;
141144
}
142145

146+
public boolean unstable_enableSyncVoidMethods() {
147+
return mEnableTurboModuleSyncVoidMethods;
148+
}
149+
143150
@Nullable
144151
@Override
145152
public TurboModule getModule(String moduleName) {

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ public class ReactFeatureFlags {
3636
*/
3737
public static volatile boolean unstable_useTurboModuleInteropForAllTurboModules = false;
3838

39+
public static volatile boolean unstable_enableTurboModuleSyncVoidMethods = false;
40+
3941
/**
4042
* Should this application use the new (Fabric) Renderer? If yes, all rendering in this app will
4143
* use Fabric instead of the legacy renderer.

0 commit comments

Comments
 (0)