TurboModuleRegistry

Interface to allow for creating and retrieving NativeModules. Why is this this class prefixed with "Turbo", even though it supports both legacy NativeModules, and TurboModules? Because there already is a NativeModuleRegistry (a part of the legacy architecture). Once that class is deleted, we should rename this interface accordingly.

Inheritors

Properties

Link copied to clipboard

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

Link copied to clipboard

Get all instantiated NativeModules.

Functions

Link copied to clipboard
abstract fun getModule(moduleName: String): NativeModule?

Return the NativeModule instance that has that name moduleName. If the moduleName TurboModule hasn't been instantiated, instantiate it. If no TurboModule is registered under moduleName, return null.

Link copied to clipboard
abstract fun hasModule(moduleName: String): Boolean

Has the NativeModule with name moduleName been instantiated?

Link copied to clipboard
abstract fun invalidate()

Called during the turn down process of ReactHost. This method is called before React Native is stopped.