Default React Host
object DefaultReactHost
A utility class that allows you to simplify the setup of a ReactHost for new apps in Open Source.
ReactHost is an interface responsible of handling the lifecycle of a React Native app when running in bridgeless mode.
Functions
Link copied to clipboard
fun getDefaultReactHost(context: Context, reactNativeHost: ReactNativeHost, jsRuntimeFactory: JSRuntimeFactory? = null): ReactHost
fun getDefaultReactHost(context: Context, packageList: List<ReactPackage>, jsMainModulePath: String = "index", jsBundleAssetPath: String = "index", jsBundleFilePath: String? = null, jsRuntimeFactory: JSRuntimeFactory? = null, useDevSupport: Boolean = ReactBuildConfig.DEBUG, cxxReactPackageProviders: List<(ReactContext) -> CxxReactPackage> = emptyList()): ReactHost
fun getDefaultReactHost(context: Context, packageList: List<ReactPackage>, jsMainModulePath: String = "index", jsBundleAssetPath: String = "index", jsBundleFilePath: String? = null, isHermesEnabled: Boolean = true, useDevSupport: Boolean = ReactBuildConfig.DEBUG, cxxReactPackageProviders: List<(ReactContext) -> CxxReactPackage> = emptyList()): ReactHost
fun getDefaultReactHost(context: Context, packageList: List<ReactPackage>, jsMainModulePath: String = "index", jsBundleAssetPath: String = "index", jsBundleFilePath: String? = null, jsRuntimeFactory: JSRuntimeFactory? = null, useDevSupport: Boolean = ReactBuildConfig.DEBUG, cxxReactPackageProviders: List<(ReactContext) -> CxxReactPackage> = emptyList(), exceptionHandler: (Exception) -> Unit = { throw it }, bindingsInstaller: BindingsInstaller? = null): ReactHost
fun getDefaultReactHost(context: Context, packageList: List<ReactPackage>, jsMainModulePath: String = "index", jsBundleAssetPath: String = "index", jsBundleFilePath: String? = null, isHermesEnabled: Boolean = true, useDevSupport: Boolean = ReactBuildConfig.DEBUG, cxxReactPackageProviders: List<(ReactContext) -> CxxReactPackage> = emptyList(), exceptionHandler: (Exception) -> Unit = { throw it }, bindingsInstaller: BindingsInstaller? = null): ReactHost
Util function to create a default ReactHost to be used in your application. This method is used by the New App template.