Add a way to selectively enable TurboModules

Summary:
Added a flag that checks if TurboModules are enabled, don't expose them to JS via the old module system.
All TurboModules needs to implement TurboModule interface.

Reviewed By: mdvacca

Differential Revision: D13648332

fbshipit-source-id: f22506fe029ac82d56075f5b6962ff2df2e7eaa4
This commit is contained in:
Ram N
2019-01-16 19:19:53 -08:00
committed by Facebook Github Bot
parent c93edb5ffd
commit aa19fa02e9
8 changed files with 58 additions and 4 deletions

View File

@@ -30,4 +30,11 @@ public class ReactFeatureFlags {
* Reduce the number of Java-JS interops while accessing native maps
*/
public static boolean useMapNativeAccessor = false;
/**
* Should this application use TurboModules. If yes, then any module that inherits
* {@link com.facebook.react.turbomodule.core.interfaces.TurboModule} will NOT be passed in to
* C++ CatalystInstanceImpl
*/
public static boolean useTurboModules = false;
}