diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultBindingsInstaller.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultBindingsInstaller.kt index e8eba2256b0..638451231eb 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultBindingsInstaller.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultBindingsInstaller.kt @@ -7,7 +7,12 @@ package com.facebook.react.defaults +import com.facebook.jni.annotations.DoNotStrip import com.facebook.react.bridgeless.BindingsInstaller import com.facebook.react.common.annotations.UnstableReactNativeAPI -@UnstableReactNativeAPI class DefaultBindingsInstaller : BindingsInstaller(null) {} +/** + * A utility class that provides users a default [BindingsInstaller] class that's used to initialize + * [ReactHostDelegate] + */ +@DoNotStrip @UnstableReactNativeAPI class DefaultBindingsInstaller : BindingsInstaller(null) {} diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultReactHostDelegate.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultReactHostDelegate.kt index 1d8290e534a..ba09e91f590 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultReactHostDelegate.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultReactHostDelegate.kt @@ -7,6 +7,7 @@ package com.facebook.react.defaults +import com.facebook.jni.annotations.DoNotStrip import com.facebook.react.ReactPackage import com.facebook.react.bridge.JSBundleLoader import com.facebook.react.bridge.ReactApplicationContext @@ -19,6 +20,25 @@ import com.facebook.react.common.annotations.UnstableReactNativeAPI import com.facebook.react.fabric.ReactNativeConfig import com.facebook.react.turbomodule.core.TurboModuleManagerDelegate +/** + * A utility class that allows you to simplify the initialization of React Native by setting up a + * [ReactHostDelegate] that uses recommended dependencies. + * + * @param jSMainModulePath 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` + * @param jSBundleLoader Bundle loader to use when setting up JS environment.

Example: + * [JSBundleLoader.createFileLoader(application, bundleFile)] + * @param reactPackages list of reactPackages to expose Native Modules and View Components to JS + * @param jSEngineInstance Object that holds a native reference to the javascript engine + * @param bindingsInstaller Object that holds a native C++ references that allow host applications + * to install C++ objects into jsi::Runtime during the initialization of React Native + * @param reactNativeConfig ReactNative Configuration that allows to customize the behavior of + * key/value pairs used by the framework to enable/disable experimental capabilities + * @param exceptionHandler Callback that can be used by React Native host applications to react to + * exceptions thrown by the internals of React Native. + */ +@DoNotStrip @UnstableReactNativeAPI class DefaultReactHostDelegate( override val jSMainModulePath: String,