Skip to content

Commit 75ff136

Browse files
mdvaccafacebook-github-bot
authored andcommitted
Load 'ReactFabric' only when it is required to render a Fabric component
Reviewed By: yungsters Differential Revision: D7970603 fbshipit-source-id: 34676b9e174bc1e1141f4f435aa2c8e2b62cd5b9
1 parent b762f52 commit 75ff136

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Libraries/ReactNative/renderApplication.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212

1313
const AppContainer = require('AppContainer');
1414
const React = require('React');
15-
const ReactFabric = require('ReactFabric');
16-
const ReactNative = require('ReactNative');
1715

1816
const invariant = require('fbjs/lib/invariant');
1917

@@ -51,9 +49,9 @@ function renderApplication<Props: Object>(
5149
}
5250

5351
if (fabric) {
54-
ReactFabric.render(renderable, rootTag);
52+
require('ReactFabric').render(renderable, rootTag);
5553
} else {
56-
ReactNative.render(renderable, rootTag);
54+
require('ReactNative').render(renderable, rootTag);
5755
}
5856
}
5957

0 commit comments

Comments
 (0)