Load 'ReactFabric' only when it is required to render a Fabric component
Reviewed By: yungsters Differential Revision: D7970603 fbshipit-source-id: 34676b9e174bc1e1141f4f435aa2c8e2b62cd5b9
This commit is contained in:
parent
b762f5293e
commit
75ff136f03
|
@ -12,8 +12,6 @@
|
|||
|
||||
const AppContainer = require('AppContainer');
|
||||
const React = require('React');
|
||||
const ReactFabric = require('ReactFabric');
|
||||
const ReactNative = require('ReactNative');
|
||||
|
||||
const invariant = require('fbjs/lib/invariant');
|
||||
|
||||
|
@ -51,9 +49,9 @@ function renderApplication<Props: Object>(
|
|||
}
|
||||
|
||||
if (fabric) {
|
||||
ReactFabric.render(renderable, rootTag);
|
||||
require('ReactFabric').render(renderable, rootTag);
|
||||
} else {
|
||||
ReactNative.render(renderable, rootTag);
|
||||
require('ReactNative').render(renderable, rootTag);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue