Package 

Class TurboModuleManager

  • All Implemented Interfaces:
    com.facebook.react.bridge.JSIModule , com.facebook.react.turbomodule.core.interfaces.TurboModuleRegistry

    
    public class TurboModuleManager
     implements JSIModule, TurboModuleRegistry
                        

    This is the main class and entry point for TurboModules. Note that this is a hybrid class, and has a C++ counterpart This class installs the JSI bindings. It also implements the method to get a Java module, that the C++ counterpart calls.

    • Method Detail

      • getEagerInitModuleNames

         List<String> getEagerInitModuleNames()

        Return the names of all the NativeModules that are supposed to be eagerly initialized. Bycalling getModule on each name, this allows the application to eagerly initialize itsNativeModules.

      • getModule

        @Nullable() TurboModule getModule(String moduleName)

        Return the TurboModule instance that corresponds to the provided moduleName.

        This method: - Creates and initializes the module if it doesn't already exist. - Returnsnull after TurboModuleManager has been torn down.

      • hasModule

         boolean hasModule(String moduleName)

        Has the TurboModule with name `moduleName` been instantiated?

      • initialize

         void initialize()

        This is called at the end of createCatalystInstance afterthe CatalystInstance has been created, in order to initialize NativeModules that require theCatalystInstance or JS modules.