mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
allow bindings installer to be passed down to DefaultReactHost (#47944)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47944 Changelog: [Internal] adding an option to pass down bindings installer from product layer Reviewed By: mlord93 Differential Revision: D66477349 fbshipit-source-id: 9462cbe0b1fcee875c18de0426c0c1b02f086ff1
This commit is contained in:
1 parent
40c194cf47
commit
3c09d6bfce
2 files changed
+8
-5
No files matched your search
@@ -2036,9 +2036,9 @@ public final class com/facebook/react/defaults/DefaultReactHost {
|
||||
public static final field INSTANCE Lcom/facebook/react/defaults/DefaultReactHost;
|
||||
public static final fun getDefaultReactHost (Landroid/content/Context;Lcom/facebook/react/ReactNativeHost;)Lcom/facebook/react/ReactHost;
|
||||
public static final fun getDefaultReactHost (Landroid/content/Context;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZLjava/util/List;)Lcom/facebook/react/ReactHost;
|
||||
public static final fun getDefaultReactHost (Landroid/content/Context;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZLjava/util/List;Lkotlin/jvm/functions/Function1;)Lcom/facebook/react/ReactHost;
|
||||
public static final fun getDefaultReactHost (Landroid/content/Context;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZLjava/util/List;Lkotlin/jvm/functions/Function1;Lcom/facebook/react/runtime/BindingsInstaller;)Lcom/facebook/react/ReactHost;
|
||||
public static synthetic fun getDefaultReactHost$default (Landroid/content/Context;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZLjava/util/List;ILjava/lang/Object;)Lcom/facebook/react/ReactHost;
|
||||
public static synthetic fun getDefaultReactHost$default (Landroid/content/Context;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZLjava/util/List;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lcom/facebook/react/ReactHost;
|
||||
public static synthetic fun getDefaultReactHost$default (Landroid/content/Context;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZLjava/util/List;Lkotlin/jvm/functions/Function1;Lcom/facebook/react/runtime/BindingsInstaller;ILjava/lang/Object;)Lcom/facebook/react/ReactHost;
|
||||
}
|
||||
|
||||
public abstract class com/facebook/react/defaults/DefaultReactNativeHost : com/facebook/react/ReactNativeHost {
|
||||
|
||||
+6
-3
@@ -16,6 +16,7 @@ import com.facebook.react.bridge.ReactContext
|
||||
import com.facebook.react.common.annotations.UnstableReactNativeAPI
|
||||
import com.facebook.react.common.build.ReactBuildConfig
|
||||
import com.facebook.react.fabric.ComponentFactory
|
||||
import com.facebook.react.runtime.BindingsInstaller
|
||||
import com.facebook.react.runtime.JSCInstance
|
||||
import com.facebook.react.runtime.ReactHostImpl
|
||||
import com.facebook.react.runtime.cxxreactpackage.CxxReactPackage
|
||||
@@ -70,9 +71,9 @@ public object DefaultReactHost {
|
||||
jsBundleFilePath,
|
||||
isHermesEnabled,
|
||||
useDevSupport,
|
||||
cxxReactPackageProviders) {
|
||||
throw it
|
||||
}
|
||||
cxxReactPackageProviders,
|
||||
{ throw it },
|
||||
null)
|
||||
|
||||
/**
|
||||
* Util function to create a default [ReactHost] to be used in your application. This method is
|
||||
@@ -106,6 +107,7 @@ public object DefaultReactHost {
|
||||
useDevSupport: Boolean = ReactBuildConfig.DEBUG,
|
||||
cxxReactPackageProviders: List<(ReactContext) -> CxxReactPackage> = emptyList(),
|
||||
exceptionHandler: (Exception) -> Unit = { throw it },
|
||||
bindingsInstaller: BindingsInstaller? = null,
|
||||
): ReactHost {
|
||||
if (reactHost == null) {
|
||||
|
||||
@@ -128,6 +130,7 @@ public object DefaultReactHost {
|
||||
jsBundleLoader = bundleLoader,
|
||||
reactPackages = packageList,
|
||||
jsRuntimeFactory = jsRuntimeFactory,
|
||||
bindingsInstaller = bindingsInstaller,
|
||||
turboModuleManagerDelegateBuilder = defaultTmmDelegateBuilder,
|
||||
exceptionHandler = exceptionHandler)
|
||||
val componentFactory = ComponentFactory()
|
||||
|
||||
Reference in new issue
Block a user