Skip to content

Commit

Permalink
Load 'ReactFabric' only when it is required to render a Fabric component
Browse files Browse the repository at this point in the history
Reviewed By: yungsters

Differential Revision: D7970603

fbshipit-source-id: 34676b9e174bc1e1141f4f435aa2c8e2b62cd5b9
  • Loading branch information
mdvacca authored and facebook-github-bot committed May 12, 2018
1 parent b762f52 commit 75ff136
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Libraries/ReactNative/renderApplication.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 75ff136

Please sign in to comment.