Catalyst Instance
Deprecated
This class is deprecated, please to migrate to new architecture using [com.facebook.react.defaults.DefaultReactHost] instead.
A higher level API on top of the asynchronous JSC bridge. This provides an environment allowing the invocation of JavaScript methods and lets a set of Java APIs be invocable from JavaScript as well.
Inheritors
Properties
Do not use this anymore. Use getRuntimeExecutor instead. Get the C pointer (as a long) to the JavaScriptCore context associated with this instance.
Returns a hybrid object that contains a pointer to a JS CallInvoker, which is used to schedule work on the JS Thread. Required for TurboModuleManager initialization.
Returns a hybrid object that contains a pointer to a NativeMethodCallInvoker, which is used to schedule work on the NativeModules thread. Required for TurboModuleManager initialization.
Functions
Adds a idle listener for this Catalyst instance. The listener will receive notifications whenever the bridge transitions from idle to busy and vice-versa, where the busy state is defined as there being some non-zero number of calls to JS that haven't resolved via a onBatchCompleted call. The listener should be purely passive and not affect application logic.
This method permits a CatalystInstance to extend the known Native modules. This provided registry contains only the new modules to load.
Called when the system generates a memory warning.
Initialize all the native modules
Load a JS bundle from Android assets. See JSBundleLoader.createAssetLoader
Load a JS bundle from the filesystem. See JSBundleLoader.createFileLoader and JSBundleLoader.createCachedBundleFromNetworkLoader
Load a split JS bundle from the filesystem. See JSBundleLoader.createCachedSplitBundleFromNetworkLoader.
This method registers the file path of an additional JS segment by its ID.
Removes a NotThreadSafeBridgeIdleDebugListener previously added with .addBridgeIdleDebugListener
This API is used in situations where the JS bundle is being executed not on the device, but on a host machine. In that case, we must provide two source URLs for the JS bundle: One to be used on the device, and one to be used on the remote debugging machine.