mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Document ReactHostDelegate (#37562)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/37562 Add documentation for ReactHostDelegate changelog: [internal] internal Reviewed By: cortinico Differential Revision: D45717674 fbshipit-source-id: e0d6d70edf4f4cf70b53807732b35f5fda917fc3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
cd71a71ad1
commit
20808b5eb5
+28
-1
@@ -16,24 +16,51 @@ import com.facebook.react.common.annotations.UnstableReactNativeAPI
|
||||
import com.facebook.react.fabric.ReactNativeConfig
|
||||
import com.facebook.react.turbomodule.core.TurboModuleManagerDelegate
|
||||
|
||||
/** TODO: add javadoc for class and methods */
|
||||
/**
|
||||
* [ReactHostDelegate] is an interface that defines parameters required to initialize React Native.
|
||||
* This interface works in combination with [ReactHost]
|
||||
*/
|
||||
@ThreadSafe
|
||||
@UnstableReactNativeAPI
|
||||
interface ReactHostDelegate {
|
||||
/**
|
||||
* Path to your app's main module on Metro. This is used when reloading JS during development. All
|
||||
* paths are relative to the root folder the packager is serving files from. Examples:
|
||||
* `index.android` or `subdirectory/index.android`
|
||||
*/
|
||||
val jSMainModulePath: String
|
||||
|
||||
/**
|
||||
* Object that holds a native C++ references that allow host applications to install C++ objects
|
||||
* into jsi::Runtime during the initialization of React Native
|
||||
*/
|
||||
val bindingsInstaller: BindingsInstaller?
|
||||
|
||||
/** list of [ReactPackage] to expose Native Modules and View Components to JS */
|
||||
val reactPackages: List<ReactPackage>
|
||||
|
||||
/** Object that holds a native reference to the javascript engine */
|
||||
val jSEngineInstance: JSEngineInstance
|
||||
|
||||
/**
|
||||
* Bundle loader to use when setting up JS environment. <p>Example:
|
||||
* [JSBundleLoader.createFileLoader(application, bundleFile)]
|
||||
*/
|
||||
val jSBundleLoader: JSBundleLoader
|
||||
|
||||
/** TODO: combine getTurboModuleManagerDelegate inside [ReactPackage] */
|
||||
fun getTurboModuleManagerDelegate(context: ReactApplicationContext): TurboModuleManagerDelegate
|
||||
|
||||
/**
|
||||
* Callback that can be used by React Native host applications to react to exceptions thrown by
|
||||
* the internals of React Native.
|
||||
*/
|
||||
fun handleInstanceException(error: Exception)
|
||||
|
||||
/**
|
||||
* ReactNative Configuration that allows to customize the behavior of key/value pairs used by the
|
||||
* framework to enable/disable experimental capabilities
|
||||
*/
|
||||
fun getReactNativeConfig(context: ReactContext): ReactNativeConfig
|
||||
|
||||
@UnstableReactNativeAPI
|
||||
|
||||
Reference in New Issue
Block a user