From 14725ba76887a1ceb0e722e169151e0e78ce1d95 Mon Sep 17 00:00:00 2001 From: Taeho Kim Date: Sun, 6 Dec 2015 17:31:30 +0900 Subject: [PATCH] Clean up caller sites of instantiateReactComponent The 2nd argument was removed since #4139. --- src/renderers/dom/client/ReactMount.js | 2 +- src/renderers/dom/server/ReactServerRendering.js | 2 +- src/renderers/shared/reconciler/ReactChildReconciler.js | 7 ++----- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/renderers/dom/client/ReactMount.js b/src/renderers/dom/client/ReactMount.js index 06096189f6..603e2bf1ac 100644 --- a/src/renderers/dom/client/ReactMount.js +++ b/src/renderers/dom/client/ReactMount.js @@ -330,7 +330,7 @@ var ReactMount = { ); ReactBrowserEventEmitter.ensureScrollValueMonitoring(); - var componentInstance = instantiateReactComponent(nextElement, null); + var componentInstance = instantiateReactComponent(nextElement); // The initial render is synchronous but any updates that happen during // rendering, in componentWillMount or componentDidMount, will be batched diff --git a/src/renderers/dom/server/ReactServerRendering.js b/src/renderers/dom/server/ReactServerRendering.js index c80c1dad95..ea9d842943 100644 --- a/src/renderers/dom/server/ReactServerRendering.js +++ b/src/renderers/dom/server/ReactServerRendering.js @@ -41,7 +41,7 @@ function renderToStringImpl(element, makeStaticMarkup) { transaction = ReactServerRenderingTransaction.getPooled(makeStaticMarkup); return transaction.perform(function() { - var componentInstance = instantiateReactComponent(element, null); + var componentInstance = instantiateReactComponent(element); var markup = componentInstance.mountComponent( transaction, null, diff --git a/src/renderers/shared/reconciler/ReactChildReconciler.js b/src/renderers/shared/reconciler/ReactChildReconciler.js index 2b2a63a666..9eb136c9f8 100644 --- a/src/renderers/shared/reconciler/ReactChildReconciler.js +++ b/src/renderers/shared/reconciler/ReactChildReconciler.js @@ -32,7 +32,7 @@ function instantiateChild(childInstances, child, name) { ); } if (child != null && keyUnique) { - childInstances[name] = instantiateReactComponent(child, null); + childInstances[name] = instantiateReactComponent(child); } } @@ -101,10 +101,7 @@ var ReactChildReconciler = { ReactReconciler.unmountComponent(prevChild, name); } // The child must be instantiated before it's mounted. - var nextChildInstance = instantiateReactComponent( - nextElement, - null - ); + var nextChildInstance = instantiateReactComponent(nextElement); nextChildren[name] = nextChildInstance; } }