From 75ff136f036fd4ded267b0262db1defff1542a97 Mon Sep 17 00:00:00 2001 From: David Vacca Date: Fri, 11 May 2018 17:09:14 -0700 Subject: [PATCH] Load 'ReactFabric' only when it is required to render a Fabric component Reviewed By: yungsters Differential Revision: D7970603 fbshipit-source-id: 34676b9e174bc1e1141f4f435aa2c8e2b62cd5b9 --- Libraries/ReactNative/renderApplication.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Libraries/ReactNative/renderApplication.js b/Libraries/ReactNative/renderApplication.js index 42e9673dbc4895..7d699f754651f0 100644 --- a/Libraries/ReactNative/renderApplication.js +++ b/Libraries/ReactNative/renderApplication.js @@ -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( } if (fabric) { - ReactFabric.render(renderable, rootTag); + require('ReactFabric').render(renderable, rootTag); } else { - ReactNative.render(renderable, rootTag); + require('ReactNative').render(renderable, rootTag); } }