mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Re-introduce UIImplementationProvider
Summary: UIImplementationProvider was removed as part of D8650376, this was a breaking change that caused problems in OSS. This diff introduces the concept of a deprecated UIImplementationProvider again to allow OSS community to upgrade to latest version of RN. Reviewed By: achen1 Differential Revision: D10456317 fbshipit-source-id: 6817629524f927dfcb5ebc054dbfd983877b7606
This commit is contained in:
committed by
Facebook Github Bot
parent
0bf520a821
commit
b002df945b
@@ -15,6 +15,7 @@ import com.facebook.react.bridge.ReactMarker;
|
||||
import com.facebook.react.bridge.ReactMarkerConstants;
|
||||
import com.facebook.react.common.LifecycleState;
|
||||
import com.facebook.react.devsupport.RedBoxHandler;
|
||||
import com.facebook.react.uimanager.UIImplementationProvider;
|
||||
import java.util.List;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@@ -70,6 +71,7 @@ public abstract class ReactNativeHost {
|
||||
.setUseDeveloperSupport(getUseDeveloperSupport())
|
||||
.setRedBoxHandler(getRedBoxHandler())
|
||||
.setJavaScriptExecutorFactory(getJavaScriptExecutorFactory())
|
||||
.setUIImplementationProvider(getUIImplementationProvider())
|
||||
.setJSIModulesPackage(getJSIModulePackage())
|
||||
.setInitialLifecycleState(LifecycleState.BEFORE_CREATE);
|
||||
|
||||
@@ -107,6 +109,16 @@ public abstract class ReactNativeHost {
|
||||
return mApplication;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the {@link UIImplementationProvider} to use. Override this method if you want to use a
|
||||
* custom UI implementation.
|
||||
*
|
||||
* Note: this is very advanced functionality, in 99% of cases you don't need to override this.
|
||||
*/
|
||||
protected UIImplementationProvider getUIImplementationProvider() {
|
||||
return new UIImplementationProvider();
|
||||
}
|
||||
|
||||
protected @Nullable
|
||||
JSIModulePackage getJSIModulePackage() {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user