Skip to content

Commit 78b226c

Browse files
philIipfacebook-github-bot
authored andcommitted
docs for unstable_enableSyncVoidMethods (facebook#40779)
Summary: Pull Request resolved: facebook#40779 Changelog: [Internal] adding docs to unstable_enableSyncVoidMethods config related methods Reviewed By: mdvacca, cipolleschi Differential Revision: D50160367 fbshipit-source-id: 6fc825f7225f11909e0749c75d03b2ddadc3d5aa
1 parent c7cf3e0 commit 78b226c

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

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

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

39+
/**
40+
* By default, native module methods that return void run asynchronously. This flag will make
41+
* execution of void methods in TurboModules stay on the JS thread.
42+
*/
3943
public static volatile boolean unstable_enableTurboModuleSyncVoidMethods = false;
4044

4145
/**

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/turbomodule/core/TurboModuleManagerDelegate.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ public boolean unstable_shouldRouteTurboModulesThroughLegacyModuleInterop() {
7070
return false;
7171
}
7272

73+
/* Can TurboModule methods that return void execute on the JS thread? */
7374
public boolean unstable_enableSyncVoidMethods() {
7475
return false;
7576
}

0 commit comments

Comments
 (0)