@@ -16,24 +16,51 @@ import com.facebook.react.common.annotations.UnstableReactNativeAPI
1616import com.facebook.react.fabric.ReactNativeConfig
1717import com.facebook.react.turbomodule.core.TurboModuleManagerDelegate
1818
19- /* * TODO: add javadoc for class and methods */
19+ /* *
20+ * [ReactHostDelegate] is an interface that defines parameters required to initialize React Native.
21+ * This interface works in combination with [ReactHost]
22+ */
2023@ThreadSafe
2124@UnstableReactNativeAPI
2225interface ReactHostDelegate {
26+ /* *
27+ * Path to your app's main module on Metro. This is used when reloading JS during development. All
28+ * paths are relative to the root folder the packager is serving files from. Examples:
29+ * `index.android` or `subdirectory/index.android`
30+ */
2331 val jSMainModulePath: String
2432
33+ /* *
34+ * Object that holds a native C++ references that allow host applications to install C++ objects
35+ * into jsi::Runtime during the initialization of React Native
36+ */
2537 val bindingsInstaller: BindingsInstaller ?
2638
39+ /* * list of [ReactPackage] to expose Native Modules and View Components to JS */
2740 val reactPackages: List <ReactPackage >
2841
42+ /* * Object that holds a native reference to the javascript engine */
2943 val jSEngineInstance: JSEngineInstance
3044
45+ /* *
46+ * Bundle loader to use when setting up JS environment. <p>Example:
47+ * [JSBundleLoader.createFileLoader(application, bundleFile)]
48+ */
3149 val jSBundleLoader: JSBundleLoader
3250
51+ /* * TODO: combine getTurboModuleManagerDelegate inside [ReactPackage] */
3352 fun getTurboModuleManagerDelegate (context : ReactApplicationContext ): TurboModuleManagerDelegate
3453
54+ /* *
55+ * Callback that can be used by React Native host applications to react to exceptions thrown by
56+ * the internals of React Native.
57+ */
3558 fun handleInstanceException (error : Exception )
3659
60+ /* *
61+ * ReactNative Configuration that allows to customize the behavior of key/value pairs used by the
62+ * framework to enable/disable experimental capabilities
63+ */
3764 fun getReactNativeConfig (context : ReactContext ): ReactNativeConfig
3865
3966 @UnstableReactNativeAPI
0 commit comments