mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Pass fabric flag from native to JS
Reviewed By: mdvacca Differential Revision: D7373722 fbshipit-source-id: 3cd051f38677900693f3da797effa11f9161df37
This commit is contained in:
committed by
Facebook Github Bot
parent
046d4cee8b
commit
cbb7c7c193
@@ -35,7 +35,6 @@ export type AppConfig = {
|
||||
component?: ComponentProvider,
|
||||
run?: Function,
|
||||
section?: boolean,
|
||||
fabric?: boolean,
|
||||
};
|
||||
export type Runnable = {
|
||||
component?: ComponentProvider,
|
||||
@@ -85,7 +84,6 @@ const AppRegistry = {
|
||||
appConfig.appKey,
|
||||
appConfig.component,
|
||||
appConfig.section,
|
||||
appConfig.fabric,
|
||||
);
|
||||
}
|
||||
});
|
||||
@@ -100,13 +98,12 @@ const AppRegistry = {
|
||||
appKey: string,
|
||||
componentProvider: ComponentProvider,
|
||||
section?: boolean,
|
||||
fabric?: boolean,
|
||||
): string {
|
||||
runnables[appKey] = {
|
||||
componentProvider,
|
||||
run: appParameters => {
|
||||
let renderFunc = renderApplication;
|
||||
if (fabric) {
|
||||
if (appParameters.fabric) {
|
||||
invariant(
|
||||
fabricRendererProvider != null,
|
||||
'A Fabric renderer provider must be set to render Fabric components',
|
||||
|
||||
Reference in New Issue
Block a user